Browse Source

:art: fix https://github.com/siyuan-note/siyuan/issues/9678

Vanessa 1 năm trước cách đây
mục cha
commit
af2fd13ae1

+ 1 - 1
app/src/mobile/index.ts

@@ -98,7 +98,7 @@ class App {
                         fetchPost("/api/system/getEmojiConf", {}, emojiResponse => {
                             window.siyuan.emojis = emojiResponse.data as IEmoji[];
                             setNoteBook(() => {
-                                initFramework(this);
+                                initFramework(this, confResponse.data.start);
                                 initRightMenu(this);
                                 openChangelog();
                                 const unPinsMenu: IMenu[] = [];

+ 5 - 1
app/src/mobile/util/initFramework.ts

@@ -20,7 +20,7 @@ import {syncGuide} from "../../sync/syncGuide";
 import {Inbox} from "../../layout/dock/Inbox";
 import {App} from "../../index";
 
-export const initFramework = (app: App) => {
+export const initFramework = (app: App, isStart:boolean) => {
     setInlineStyle();
     renderSnippet();
     initKeyboardToolbar();
@@ -122,6 +122,10 @@ export const initFramework = (app: App) => {
                 idZoomIn.isZoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
             return;
         }
+        if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) {
+            setEmpty(app);
+            return;
+        }
         const localDoc = window.siyuan.storage[Constants.LOCAL_DOCINFO];
         fetchPost("/api/block/checkBlockExist", {id: localDoc.id}, existResponse => {
             if (existResponse.data) {

+ 3 - 0
app/src/protyle/header/Background.ts

@@ -288,6 +288,9 @@ export class Background {
                             id: protyle.block.rootID,
                             attrs: {"title-img": this.ial["title-img"]}
                         });
+                        /// #if MOBILE
+                        window.siyuan.menus.menu.remove();
+                        /// #endif
                     }, Constants.SIYUAN_ASSETS_IMAGE);
                     event.preventDefault();
                     event.stopPropagation();