Browse Source

:art: https://github.com/siyuan-note/siyuan/issues/12425

Vanessa 9 months ago
parent
commit
800286ebce
2 changed files with 6 additions and 6 deletions
  1. 0 6
      app/src/protyle/header/Background.ts
  2. 6 0
      app/src/protyle/util/onGet.ts

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

@@ -416,12 +416,6 @@ export class Background {
                 target = target.parentElement;
                 target = target.parentElement;
             }
             }
         });
         });
-
-        /// #if MOBILE
-        if (!protyle.disabled) {
-          this.element.classList.add("protyle-background--mobileshow");
-        }
-        /// #endif
     }
     }
 
 
     private removeTag(protyle: IProtyle) {
     private removeTag(protyle: IProtyle) {

+ 6 - 0
app/src/protyle/util/onGet.ts

@@ -249,6 +249,12 @@ const setHTML = (options: {
         return;
         return;
     }
     }
 
 
+    /// #if MOBILE
+    if (!protyle.disabled && !options.action.includes(Constants.CB_GET_ALL)) {
+        protyle.background.element.classList.add("protyle-background--mobileshow");
+    }
+    /// #endif
+
     if (protyle.options.render.breadcrumb) {
     if (protyle.options.render.breadcrumb) {
         protyle.breadcrumb.toggleExit(!options.action.includes(Constants.CB_GET_ALL));
         protyle.breadcrumb.toggleExit(!options.action.includes(Constants.CB_GET_ALL));
         protyle.breadcrumb.render(protyle);
         protyle.breadcrumb.render(protyle);