mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 22:21:28 +08:00
This commit is contained in:
parent
a05faf6fc1
commit
5c739ffa77
@ -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":
|
||||
|
@ -580,20 +580,18 @@ 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 = 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);
|
||||
}
|
||||
/// #endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((item: HTMLElement) => {
|
||||
|
Loading…
Reference in New Issue
Block a user