Skip to content

Build your personal knowledge base with Trilium Notes

feat(tray): reload recent notes on change

Elian Doran60d8bc823860
diff --git a/src/public/app/components/note_context.ts b/src/public/app/components/note_context.ts
index cc3e368f3e..38bdf555ce 100644
--- a/src/public/app/components/note_context.ts
+++ b/src/public/app/components/note_context.ts
@@ -163,6 +163,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
noteId: this.note?.noteId,
notePath: this.notePath
});
+ utils.reloadTray();
}
}, 5000);
}
diff --git a/src/public/app/services/utils.ts b/src/public/app/services/utils.ts
index 067f8bf505..aa85daf4ac 100644
--- a/src/public/app/services/utils.ts
+++ b/src/public/app/services/utils.ts
@@ -8,6 +8,11 @@ function reloadFrontendApp(reason?: string) {
window.location.reload();
}
+/**
+ * Triggers the system tray to update its menu items, i.e. after a change in dynamic content such as bookmarks or recent notes.
+ *
+ * On any other platform than Electron, nothing happens.
+ */
function reloadTray() {
if (!isElectron()) {
return;