fix setting the title bar when switching note

This commit is contained in:
zadam
2019-05-29 19:55:05 +02:00
parent 373ec4ac50
commit 8d3262d232
2 changed files with 16 additions and 1 deletions

View File

@@ -101,6 +101,8 @@ class TabContext {
this.setCurrentNotePathToHash();
this.setTitleBar();
setTimeout(async () => {
// we include the note into recent list only if the user stayed on the note at least 5 seconds
if (notePath && notePath === this.notePath) {
@@ -123,6 +125,13 @@ class TabContext {
show() {
this.$tabContent.show();
this.setCurrentNotePathToHash();
this.setTitleBar();
}
setTitleBar() {
if (!this.$tabContent.is(":visible")) {
return;
}
document.title = "Trilium Notes";