navigation state is more nicely and completely serialized into URL

This commit is contained in:
zadam
2023-04-11 21:41:55 +02:00
parent 9e71c44c76
commit 17128c5874
12 changed files with 183 additions and 99 deletions

View File

@@ -155,14 +155,14 @@ $(window).on('beforeunload', () => {
$(window).on('hashchange', function() {
if (treeService.isNotePathInAddress()) {
const [notePath, ntxId] = treeService.getHashValueFromAddress();
const {notePath, ntxId, viewScope} = treeService.parseNavigationStateFromAddress();
if (!notePath && !ntxId) {
console.log(`Invalid hash value "${document.location.hash}", ignoring.`);
return;
}
appContext.tabManager.switchToNoteContext(ntxId, notePath);
appContext.tabManager.switchToNoteContext(ntxId, notePath, viewScope);
}
});