mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-10 10:48:50 +01:00
This commit is contained in:
parent
d2cf402c6a
commit
2d11266b31
8 changed files with 23 additions and 31 deletions
|
|
@ -2,6 +2,8 @@
|
|||
import {exportLayout} from "../layout/util";
|
||||
/// #endif
|
||||
import {hideMessage, showMessage} from "../dialog/message";
|
||||
import {setStorageVal} from "../protyle/util/compatibility";
|
||||
import {Constants} from "../constants";
|
||||
|
||||
export const processMessage = (response: IWebSocketData) => {
|
||||
if ("msg" === response.cmd) {
|
||||
|
|
@ -20,6 +22,10 @@ export const processMessage = (response: IWebSocketData) => {
|
|||
return false;
|
||||
}
|
||||
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
|
||||
|
|
@ -27,7 +33,6 @@ export const processMessage = (response: IWebSocketData) => {
|
|||
reload: true,
|
||||
onlyData: false,
|
||||
errorExit: false,
|
||||
dropEditScroll: response.data?.resetScroll,
|
||||
});
|
||||
/// #endif
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue