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),
};
layoutToJSON(window.siyuan.layout.layout, layoutJSON.layout, breakObj);
window.siyuan.config.uiLayout = layoutJSON;
}
}
if (Object.keys(breakObj).length > 0 && saveCount < 10) {
saveCount++;
setTimeout(() => {

View File

@ -2,7 +2,7 @@ import {fetchSyncPost} from "../util/fetch";
import {App} from "../index";
import {Plugin} from "./index";
/// #if !MOBILE
import {resizeTopBar} from "../layout/util";
import {resizeTopBar, saveLayout} from "../layout/util";
/// #endif
import {API} from "./API";
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);
}
});
saveLayout();
/// #endif
};