refactoring

This commit is contained in:
zadam
2020-02-07 21:43:02 +01:00
parent 14d6372bd8
commit 47f7f5f4d9
6 changed files with 13 additions and 10 deletions

View File

@@ -490,7 +490,7 @@ export default class TabRowWidget extends BasicWidget {
this.draggabillies.push(draggabilly);
draggabilly.on('pointerDown', _ => {
this.appContext.tabManager.activateTab(tabEl.getAttribute('data-tab-id'));
this.tabManager.activateTab(tabEl.getAttribute('data-tab-id'));
});
draggabilly.on('dragStart', _ => {
@@ -585,7 +585,7 @@ export default class TabRowWidget extends BasicWidget {
tabNoteSwitchedListener({tabId}) {
const $tab = this.getTabById(tabId);
const {note} = this.appContext.tabManager.getTabContextById(tabId);
const {note} = this.tabManager.getTabContextById(tabId);
this.updateTab($tab, note);
}
@@ -609,7 +609,7 @@ export default class TabRowWidget extends BasicWidget {
}
async entitiesReloadedListener({loadResults}) {
for (const tabContext of this.appContext.tabManager.getTabContexts()) {
for (const tabContext of this.tabManager.getTabContexts()) {
if (loadResults.isNoteReloaded(tabContext.noteId)) {
const $tab = this.getTabById(tabContext.tabId);
@@ -619,7 +619,7 @@ export default class TabRowWidget extends BasicWidget {
}
treeCacheReloadedListener() {
for (const tabContext of this.appContext.tabManager.getTabContexts()) {
for (const tabContext of this.tabManager.getTabContexts()) {
const $tab = this.getTabById(tabContext.tabId);
this.updateTab($tab, tabContext.note);