feat(client): allow triggering search on hash change

This commit is contained in:
Elian Doran 2025-03-06 22:21:50 +02:00
parent 79cc1cbf17
commit 89767d0135
No known key found for this signature in database

View File

@ -551,10 +551,12 @@ $(window).on("beforeunload", () => {
});
$(window).on("hashchange", function () {
const { notePath, ntxId, viewScope } = linkService.parseNavigationStateFromUrl(window.location.href);
const { notePath, ntxId, viewScope, searchString } = linkService.parseNavigationStateFromUrl(window.location.href);
if (notePath || ntxId) {
appContext.tabManager.switchToNoteContext(ntxId, notePath, viewScope);
} else if (searchString) {
appContext.triggerCommand("searchNotes", { searchString });
}
});