mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 重建索引时清空 scroll
This commit is contained in:
@@ -278,11 +278,21 @@ export const transactionError = () => {
|
||||
/// #endif
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
fetchPost("/api/filetree/refreshFiletree", {});
|
||||
refreshFileTree();
|
||||
dialog.destroy();
|
||||
});
|
||||
};
|
||||
|
||||
export const refreshFileTree = (cb?:() => void) => {
|
||||
window.siyuan.storage[Constants.LOCAL_FILEPOSITION] = {};
|
||||
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION]);
|
||||
fetchPost("/api/filetree/refreshFiletree", {}, () => {
|
||||
if (cb) {
|
||||
cb()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let statusTimeout: number;
|
||||
export const progressStatus = (data: IWebSocketData) => {
|
||||
const statusElement = document.querySelector("#status") as HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user