Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16121

Vanessa7b7750ea4c7d
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index c4fb9223be..afd7e11968 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -641,7 +641,11 @@ export class Outline extends Model {
}, storageResponse => {
const storageData = storageResponse.data;
if (storageData && storageData.expandIds) {
- this.tree.setExpandIds(storageData.expandIds);
+ if (storageData.expandIds.length === 0) {
+ this.tree.collapseAll();
+ } else {
+ this.tree.setExpandIds(storageData.expandIds);
+ }
}
if ((this.headerElement.querySelector("input.b3-text-field.search__label") as HTMLInputElement).value) {
this.setFilter();