various widget optimizations for faster note switching

This commit is contained in:
zadam
2020-02-03 21:16:33 +01:00
parent 66204811cf
commit 44ddcdd852
13 changed files with 111 additions and 96 deletions

View File

@@ -433,22 +433,6 @@ class AppContext {
this.openTabsChangedListener();
}
// FIXME non existent event
noteChangesSavedListener() {
const activeTabContext = this.getActiveTabContext();
if (!activeTabContext || !activeTabContext.note) {
return;
}
if (activeTabContext.note.isProtected && protectedSessionHolder.isProtectedSessionAvailable()) {
protectedSessionHolder.touchProtectedSession();
}
// run async
bundleService.executeRelationBundles(activeTabContext.note, 'runOnNoteChange', activeTabContext);
}
activateNextTabListener() {
const tabIdsInOrder = this.tabRow.getTabIdsInOrder();
const oldIdx = tabIdsInOrder.findIndex(tid => tid === this.activeTabId);