mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
close last tab should behave similarly to 0.47, fixes #2298
This commit is contained in:
parent
7e41226549
commit
fc46398a3c
@ -21,6 +21,10 @@ class NoteContext extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setEmpty() {
|
setEmpty() {
|
||||||
|
this.notePath = null;
|
||||||
|
this.noteId = null;
|
||||||
|
this.parentNoteId = null;
|
||||||
|
|
||||||
this.triggerEvent('noteSwitched', {
|
this.triggerEvent('noteSwitched', {
|
||||||
noteContext: this,
|
noteContext: this,
|
||||||
notePath: this.notePath
|
notePath: this.notePath
|
||||||
|
@ -305,6 +305,7 @@ export default class TabManager extends Component {
|
|||||||
const mainNoteContexts = this.getNoteContexts().filter(nc => nc.isMainContext());
|
const mainNoteContexts = this.getNoteContexts().filter(nc => nc.isMainContext());
|
||||||
|
|
||||||
if (mainNoteContexts.length === 1) {
|
if (mainNoteContexts.length === 1) {
|
||||||
|
mainNoteContexts[0].setEmpty();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user