Fix local folder title option refresh race
This commit is contained in:
@@ -2769,6 +2769,15 @@ import { createSidebarPageSettingsRuntime } from './sidebar-page-settings-runtim
|
||||
if (isPageSettingsOpen()) renderPageSettingsPopover();
|
||||
selectSidebarFileTreeDocument(detail.documentId, { scrollIntoView: false });
|
||||
});
|
||||
window.addEventListener('mnote:page-aggregate-synced', function(event) {
|
||||
var detail = event && event.detail ? event.detail : {};
|
||||
if (detail.scriptId && detail.scriptId !== '__MNOTE_PAGE_AGGREGATE__') return;
|
||||
var documentId = searchText(detail.documentId || '');
|
||||
if (documentId && currentDocumentId() && documentId !== currentDocumentId()) return;
|
||||
pageUiState.pageOptions = null;
|
||||
applyPageOptionsToShell();
|
||||
if (isPageSettingsOpen()) renderPageSettingsPopover();
|
||||
});
|
||||
restoreSidebarTreeTab();
|
||||
startLocalFolderSidebarWatch();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user