This commit is contained in:
zadam
2020-01-28 21:54:28 +01:00
parent 9301679707
commit 368d3b1b97
15 changed files with 76 additions and 96 deletions

View File

@@ -138,7 +138,6 @@ class AppContext {
tabNoteSwitchedListener({tabId}) {
if (tabId === this.activeTabId) {
this._setTitleBar();
this._setCurrentNotePathToHash();
}
}
@@ -151,23 +150,6 @@ class AppContext {
}
}
noteTitleChangedListener() {
this._setTitleBar();
}
async _setTitleBar() {
document.title = "Trilium Notes";
const activeTabContext = this.getActiveTabContext();
if (activeTabContext && activeTabContext.notePath) {
const note = await treeCache.getNote(treeService.getNoteIdFromNotePath(activeTabContext.notePath));
// it helps navigating in history if note title is included in the title
document.title += " - " + note.title;
}
}
/** @return {TabContext[]} */
getTabContexts() {
return this.tabContexts;