fix: linux theme sync (#5273)

This commit is contained in:
Sline
2025-11-01 15:28:56 +08:00
committed by Tunglies
Unverified
parent ae319279ae
commit 413f29e22a

View File

@@ -53,10 +53,13 @@ export const useCustomTheme = () => {
return;
}
if (
const preferBrowserMatchMedia =
typeof window !== "undefined" &&
typeof window.matchMedia === "function"
) {
typeof window.matchMedia === "function" &&
// Skip Tauri flow when running purely in browser.
!("__TAURI__" in window);
if (preferBrowserMatchMedia) {
return;
}