treecache now manages reloading when starting protected session

This commit is contained in:
zadam
2020-02-01 22:29:32 +01:00
parent 513ce1a183
commit 0054a32dc7
17 changed files with 76 additions and 75 deletions

View File

@@ -46,10 +46,7 @@ class TabContext extends Component {
await this.trigger('beforeNoteSwitch', {tabId: this.tabId}, true);
this.notePath = notePath;
const noteId = treeService.getNoteIdFromNotePath(notePath);
/** @property {NoteShort} */
this.note = await treeCache.getNote(noteId);
this.noteId = treeService.getNoteIdFromNotePath(notePath);
//this.cleanup(); // esp. on windows autocomplete is not getting closed automatically
@@ -75,8 +72,9 @@ class TabContext extends Component {
this.trigger('openTabsChanged');
}
get noteId() {
return this.note && this.note.noteId;
/** @property {NoteShort} */
get note() {
return treeCache.notes[this.noteId];
}
/** @return {NoteComplement} */