This commit is contained in:
zadam
2020-02-08 20:53:07 +01:00
parent 08687b76ea
commit 18ee239362
8 changed files with 23 additions and 36 deletions

View File

@@ -13,7 +13,7 @@ class AppContext {
constructor(layout) {
this.layout = layout;
this.tabManager = new TabManager(this);
this.components = [this.tabManager];
this.components = [];
}
async start() {
@@ -32,6 +32,7 @@ class AppContext {
$("body").append(rootContainer.render());
this.components = [
this.tabManager,
rootContainer,
new Entrypoints(this),
new DialogEventComponent(this)
@@ -112,7 +113,7 @@ $(window).on('hashchange', function() {
if (isNotePathInAddress()) {
const [notePath, tabId] = getHashValueFromAddress();
appContext.switchToTab(tabId, notePath);
appContext.tabManager.switchToTab(tabId, notePath);
}
});