Vanessa 2024-09-27 00:21:31 +08:00
parent 459b700e26
commit c33e9429cd
8 changed files with 38 additions and 25 deletions

View file

@ -24,18 +24,30 @@ export const processMessage = (response: IWebSocketData) => {
if ("reloadui" === response.cmd) {
if (response.data?.resetScroll) {
window.siyuan.storage[Constants.LOCAL_FILEPOSITION] = {};
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION]);
}
/// #if MOBILE
window.location.reload();
/// #else
exportLayout({
cb() {
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION], () => {
/// #if MOBILE
window.location.reload();
},
errorExit: false,
});
/// #endif
/// #else
exportLayout({
cb() {
window.location.reload();
},
errorExit: false,
});
/// #endif
});
} else {
/// #if MOBILE
window.location.reload();
/// #else
exportLayout({
cb() {
window.location.reload();
},
errorExit: false,
});
/// #endif
}
return false;
}