mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 01:04:21 +01:00
This commit is contained in:
parent
d2cf402c6a
commit
2d11266b31
8 changed files with 23 additions and 31 deletions
|
|
@ -52,10 +52,10 @@ const focusStack = async (app: App, stack: IBackStack) => {
|
|||
scrollAttr.focusId = stack.id;
|
||||
scrollAttr.focusStart = stack.position.start;
|
||||
scrollAttr.focusEnd = stack.position.end;
|
||||
window.siyuan.storage[Constants.LOCAL_FILEPOSITION][stack.protyle.block.rootID] = scrollAttr;
|
||||
const editor = new Editor({
|
||||
app: app,
|
||||
tab,
|
||||
scrollAttr,
|
||||
blockId: stack.zoomId || stack.protyle.block.rootID,
|
||||
action: stack.zoomId ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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