Fix performance regression on page load regarding blur effect settings, resolves #156

This commit is contained in:
Laura Hausmann 2023-08-30 14:42:37 +02:00
parent cfff8f840d
commit 9139cba602
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -376,13 +376,18 @@ function checkForSplash() {
"--modalBgFilter", "--modalBgFilter",
v ? "blur(4px)" : "none", v ? "blur(4px)" : "none",
); );
const theme = defaultStore.state.darkMode ? ColdDeviceStorage.get("darkTheme") : ColdDeviceStorage.get("lightTheme");
applyTheme(theme);
}, },
{ immediate: true }, { immediate: true },
); );
watch(
defaultStore.reactiveState.useBlurEffect,
() => {
const theme = defaultStore.state.darkMode ? ColdDeviceStorage.get("darkTheme") : ColdDeviceStorage.get("lightTheme");
applyTheme(theme);
}
);
let reloadDialogShowing = false; let reloadDialogShowing = false;
stream.on("_disconnected_", async () => { stream.on("_disconnected_", async () => {
if (defaultStore.state.serverDisconnectedBehavior === "reload") { if (defaultStore.state.serverDisconnectedBehavior === "reload") {