This commit is contained in:
Vanessa 2022-07-15 10:41:05 +08:00
parent d3b603ff6b
commit bf2e2123b7
4 changed files with 9 additions and 9 deletions

View file

@ -269,12 +269,12 @@ const JSONToCenter = (json: any, layout?: Layout | Wnd | Tab | Model) => {
}
};
export const JSONToLayout = () => {
export const JSONToLayout = (isStart: boolean) => {
JSONToCenter(window.siyuan.config.uiLayout.layout);
JSONToDock(window.siyuan.config.uiLayout);
const allModels = getAllModels();
// 启动时不打开页签,需要移除没有钉住的页签
if (window.siyuan.config.fileTree.closeTabsOnStart) {
if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) {
allModels.editor.forEach(item => {
if (item.parent.headElement && !item.parent.headElement.classList.contains("item--pin")) {
item.parent.parent.removeTab(item.parent.id);