refactoring/cleanup

This commit is contained in:
zadam
2019-05-21 20:24:40 +02:00
parent ff5ea8b311
commit 3fe9218ea8
8 changed files with 47 additions and 63 deletions

View File

@@ -791,24 +791,7 @@ $(window).bind('hashchange', async function() {
console.debug(`Switching to ${notePath} on tab ${tabId} because of hash change`);
let tabContext = noteDetailService.getTabContext(tabId);
if (!tabContext) {
noteDetailService.loadNoteDetail(notePath, {
newTab: true,
tabId: tabId,
activate: true
});
}
else {
if (!noteDetailService.isActive(tabContext)) {
noteDetailService.activateTabContext(tabContext);
}
if (notePath && tabContext.notePath !== notePath) {
noteDetailService.loadNoteDetail(notePath);
}
}
noteDetailService.switchToTab(tabId, notePath);
}
});