refactored tab activation

This commit is contained in:
zadam
2020-01-19 21:12:53 +01:00
parent 1098d75ce0
commit 0760dc742b
8 changed files with 79 additions and 44 deletions

View File

@@ -132,7 +132,13 @@ export default class NoteTitleWidget extends TabAwareWidget {
}
}
async beforeNoteSwitch({tabId}) {
async beforeNoteSwitchListener({tabId}) {
if (this.isTab(tabId)) {
await this.spacedUpdate.updateNowIfNecessary();
}
}
async beforeTabRemoveListener({tabId}) {
if (this.isTab(tabId)) {
await this.spacedUpdate.updateNowIfNecessary();
}