fix: linux theme sync (#5273)

This commit is contained in:
Sline 2025-11-01 15:28:56 +08:00 committed by Tunglies
parent ae319279ae
commit 413f29e22a
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8

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;
}