Implement sidebar tree view state persistence
This commit is contained in:
@@ -13,6 +13,7 @@ export const createSidebarPageTreeRuntime = (dependencies = {}) => {
|
||||
persistLocalFolderSelfChangeSuppression,
|
||||
persistSidebarTreeMode,
|
||||
refreshLocalFolderSidebarSnapshot,
|
||||
refreshLocalFolderAfterCommand,
|
||||
resolveWorkspaceId,
|
||||
rowCenter,
|
||||
selectSidebarFileTreeDocument,
|
||||
@@ -107,7 +108,9 @@ export const createSidebarPageTreeRuntime = (dependencies = {}) => {
|
||||
persistLocalFolderSelfChangeSuppression(nextDocumentId, Date.now() + 5000);
|
||||
}
|
||||
if (nextDocumentId && currentSourceKind() === 'local_folder') {
|
||||
await refreshLocalFolderSidebarSnapshot();
|
||||
if (typeof refreshLocalFolderAfterCommand === 'function') {
|
||||
await refreshLocalFolderAfterCommand('create', result, { parentId: effectiveParentId || null });
|
||||
}
|
||||
selectSidebarFileTreeDocument(nextDocumentId, { scrollIntoView: true });
|
||||
document.documentElement.setAttribute('data-mnote-create-page-selected-document-id', nextDocumentId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user