Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Avoid unnecessary mobile reloads on appearance changes https://github.com/siyuan-note/siyuan/issues/17151

Danielbf2969e85d08
diff --git a/app/src/mobile/util/onMessage.ts b/app/src/mobile/util/onMessage.ts
index 9561a75e7d..2b3a95e2cb 100644
--- a/app/src/mobile/util/onMessage.ts
+++ b/app/src/mobile/util/onMessage.ts
@@ -18,6 +18,7 @@ import {reloadInlineStyles} from "../../util/assets";
import {renderMobileBottomBar} from "./mobileBottomBar";
import {Constants} from "../../constants";
import {MOBILE_SIDE_PANEL_CONFIG_CHANGE_EVENT} from "./mobileSidePanelConfig";
+import {appearanceConfigApi} from "../../config/tabs/appearanceRuntime";
let statusTimeout: number;
const statusElement = document.querySelector("#status") as HTMLElement;
@@ -46,7 +47,7 @@ export const onMessage = (app: App, data: IWebSocketData) => {
}
break;
case "setAppearance":
- window.location.reload();
+ appearanceConfigApi.apply(data.data);
break;
case "reloadInlineStyles":
void reloadInlineStyles();