🎨 Refresh the data in the interface after moving the document https://github.com/siyuan-note/siyuan/issues/15762

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-10 21:39:14 +08:00
parent d5e7b27a11
commit ee4ddf89c1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 39 additions and 23 deletions

View file

@ -14,12 +14,7 @@ import {fetchPost, fetchSyncPost} from "../../util/fetch";
import {openEmojiPanel, unicode2Emoji} from "../../emoji";
import {mountHelp, newNotebook} from "../../util/mount";
import {confirmDialog} from "../../dialog/confirmDialog";
import {
isNotCtrl,
isOnlyMeta,
setStorageVal,
updateHotkeyAfterTip
} from "../../protyle/util/compatibility";
import {isNotCtrl, isOnlyMeta, setStorageVal, updateHotkeyAfterTip} from "../../protyle/util/compatibility";
import {openFileById} from "../../editor/util";
import {
hasClosestByAttribute,
@ -1019,7 +1014,7 @@ data-type="navigation-root" data-path="/">
} else {
const parentElement = this.element.querySelector(`ul[data-url="${response.data.fromNotebook}"] li[data-path="${pathPosix().dirname(response.data.fromPath)}.sy"]`) as HTMLElement;
if (parentElement && parentElement.getAttribute("data-count") === "1") {
parentElement.querySelector(".b3-list-item__toggle").classList.add(".fn__hidden");
parentElement.querySelector(".b3-list-item__toggle").classList.add("fn__hidden");
parentElement.querySelector(".b3-list-item__arrow").classList.remove("b3-list-item__arrow--open");
}
}