diff --git a/app/src/protyle/header/Background.ts b/app/src/protyle/header/Background.ts index 07cdad7d74f..ca5a7a4cf06 100644 --- a/app/src/protyle/header/Background.ts +++ b/app/src/protyle/header/Background.ts @@ -416,12 +416,6 @@ export class Background { target = target.parentElement; } }); - - /// #if MOBILE - if (!protyle.disabled) { - this.element.classList.add("protyle-background--mobileshow"); - } - /// #endif } private removeTag(protyle: IProtyle) { diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index d1fda5ad901..c882af144e5 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -249,6 +249,12 @@ const setHTML = (options: { 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) { protyle.breadcrumb.toggleExit(!options.action.includes(Constants.CB_GET_ALL)); protyle.breadcrumb.render(protyle);