WIP per-tab hoisting

This commit is contained in:
zadam
2020-11-22 23:05:02 +01:00
parent 5bbec118e4
commit 4bd86a6dfa
11 changed files with 64 additions and 66 deletions

View File

@@ -80,14 +80,13 @@ export default class Entrypoints extends Component {
}
async toggleNoteHoistingCommand() {
const note = appContext.tabManager.getActiveTabNote();
const tabContext = appContext.tabManager.getActiveTabContext();
const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
if (note.noteId === hoistedNoteId) {
hoistedNoteService.unhoist();
if (tabContext.note.noteId === tabContext.hoistedNoteId) {
await tabContext.unhoist();
}
else if (note.type !== 'search') {
hoistedNoteService.setHoistedNoteId(note.noteId);
else if (tabContext.note.type !== 'search') {
await tabContext.setHoistedNoteId(tabContext.note.noteId);
}
}