fixed double refresh of note detail

This commit is contained in:
zadam
2020-02-27 12:26:42 +01:00
parent d71763aedb
commit b2a3e1cc04
6 changed files with 37 additions and 31 deletions

View File

@@ -5,8 +5,6 @@ export default class TabAwareWidget extends BasicWidget {
setTabContextEvent({tabContext}) {
/** @var {TabContext} */
this.tabContext = tabContext;
this.noteSwitched();
}
isTab(tabId) {
@@ -80,6 +78,13 @@ export default class TabAwareWidget extends BasicWidget {
this.activeTabChanged();
}
// when note is both switched and activated, this should not produce double refresh
tabNoteSwitchedAndActivatedEvent() {
this.tabContext = appContext.tabManager.getActiveTabContext();
this.refresh();
}
treeCacheReloadedEvent() {
this.refresh();
}