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/14613

Vanessa5c739ffa77cb
diff --git a/app/src/index.ts b/app/src/index.ts
index 97dfe3637d..99d68bbb1c 100644
--- a/app/src/index.ts
+++ b/app/src/index.ts
@@ -71,7 +71,9 @@ export class App {
setDefRefCount(data.data);
break;
case "reloadTag":
- (getDockByType("tag")?.data.tag as Tag).update();
+ if (getDockByType("tag")?.data.tag instanceof Tag) {
+ (getDockByType("tag").data.tag as Tag).update();
+ }
break;
/// #if BROWSER
case "setLocalShorthandCount":
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 0b6b72acbb..6c4a200843 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -580,19 +580,17 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
enableProtyle(protyle);
}
}
- if (data.new.icon !== data.old.icon) {
+ if (data.new.icon !== data.old.icon ||
+ data.new["title-img"] !== data.old["title-img"] ||
+ data.new.tags !== data.old.tags && protyle.background) {
/// #if MOBILE
- if (window.siyuan.mobile.editor.protyle.background.ial.icon !== data.new.icon) {
- window.siyuan.mobile.editor.protyle.background.ial.icon = data.new.icon;
- window.siyuan.mobile.editor.protyle.background.render(window.siyuan.mobile.editor.protyle.background.ial, window.siyuan.mobile.editor.protyle.block.rootID);
- }
- /// #else
- if (protyle.background && protyle.background.ial.icon !== data.new.icon) {
- protyle.background.ial.icon = data.new.icon;
- protyle.background.render(protyle.background.ial, protyle.block.rootID);
- protyle.model?.parent.setDocIcon(data.new.icon);
- }
+ protyle = window.siyuan.mobile.editor.protyle;
/// #endif
+ protyle.background.ial.icon = data.new.icon;
+ protyle.background.ial.tags = data.new.tags;
+ protyle.background.ial["title-img"] = data.new["title-img"];
+ protyle.background.render(protyle.background.ial, protyle.block.rootID);
+ protyle.model?.parent.setDocIcon(data.new.icon);
}
return;
}