feat(tray): reload recent notes on change

This commit is contained in:
Elian Doran 2025-02-01 11:07:47 +02:00
parent ebc523a0fd
commit 60d8bc8238
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -163,6 +163,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
noteId: this.note?.noteId,
notePath: this.notePath
});
utils.reloadTray();
}
}, 5000);
}

View File

@ -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;