Vanessa 2024-01-17 22:46:35 +08:00
parent 739e0754ba
commit 2a20c75e3c
2 changed files with 3 additions and 2 deletions

View file

@ -198,9 +198,9 @@ export const saveLayout = () => {
right: dockToJSON(window.siyuan.layout.rightDock), right: dockToJSON(window.siyuan.layout.rightDock),
}; };
layoutToJSON(window.siyuan.layout.layout, layoutJSON.layout, breakObj); layoutToJSON(window.siyuan.layout.layout, layoutJSON.layout, breakObj);
window.siyuan.config.uiLayout = layoutJSON;
} }
} }
if (Object.keys(breakObj).length > 0 && saveCount < 10) { if (Object.keys(breakObj).length > 0 && saveCount < 10) {
saveCount++; saveCount++;
setTimeout(() => { setTimeout(() => {

View file

@ -2,7 +2,7 @@ import {fetchSyncPost} from "../util/fetch";
import {App} from "../index"; import {App} from "../index";
import {Plugin} from "./index"; import {Plugin} from "./index";
/// #if !MOBILE /// #if !MOBILE
import {resizeTopBar} from "../layout/util"; import {resizeTopBar, saveLayout} from "../layout/util";
/// #endif /// #endif
import {API} from "./API"; import {API} from "./API";
import {getFrontend, isMobile, isWindow} from "../util/functions"; import {getFrontend, isMobile, isWindow} from "../util/functions";
@ -228,5 +228,6 @@ export const afterLoadPlugin = (plugin: Plugin) => {
}], dock.config.position === "RightBottom" ? 1 : 0, dock.config.index); }], dock.config.position === "RightBottom" ? 1 : 0, dock.config.index);
} }
}); });
saveLayout();
/// #endif /// #endif
}; };