This commit is contained in:
zadam
2020-01-27 22:58:03 +01:00
parent 865f7e1ee1
commit 9301679707
4 changed files with 57 additions and 11 deletions

View File

@@ -219,4 +219,10 @@ export default class NoteDetailWidget extends TabAwareWidget {
protectedSessionStartedListener() {
this.refresh();
}
notesReloadedListener({loadResults}) {
if (loadResults.isNoteReloaded(this.noteId, this.componentId)) {
this.refresh();
}
}
}

View File

@@ -13,7 +13,15 @@ export default class TabAwareWidget extends BasicWidget {
}
isNote(noteId) {
return this.tabContext && this.tabContext.note && this.tabContext.note.noteId === noteId;
return this.noteId === noteId;
}
get note() {
return this.tabContext && this.tabContext.note;
}
get noteId() {
return this.note && this.note.noteId;
}
tabNoteSwitchedListener({tabId}) {