mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
when opening a note from hidden subtree, make sure we're hoisted
This commit is contained in:
parent
8d6801bb85
commit
c44bc60667
@ -59,6 +59,22 @@ class NoteContext extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(resolvedNotePath, "resolvedNotePath");
|
||||||
|
|
||||||
|
if (this.hoistedNoteId === 'root' && this.notePath.startsWith("root/hidden")) {
|
||||||
|
// hidden subtree displays only when hoisted so it doesn't make sense to keep root as hoisted note
|
||||||
|
|
||||||
|
let hoistedNoteId = 'hidden';
|
||||||
|
|
||||||
|
if (this.note.isLaunchBarConfig()) {
|
||||||
|
hoistedNoteId = 'lbRoot';
|
||||||
|
} else if (this.note.isOptions()) {
|
||||||
|
hoistedNoteId = 'options';
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.setHoistedNoteId(hoistedNoteId);
|
||||||
|
}
|
||||||
|
|
||||||
if (utils.isDesktop()) {
|
if (utils.isDesktop()) {
|
||||||
// close dangling autocompletes after closing the tab
|
// close dangling autocompletes after closing the tab
|
||||||
$(".aa-input").autocomplete("close");
|
$(".aa-input").autocomplete("close");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user