fix: run setupTheme after Storage is ready

pull/3157/head
yougotwill 8 months ago
parent 3ad305f451
commit c378aba960

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@ -22,10 +22,13 @@ const StyledContent = styled(Flex)`
}
img:first-child {
filter: brightness(0) saturate(100%) invert(75%) sepia(84%) saturate(3272%) hue-rotate(103deg)
brightness(106%) contrast(103%);
margin: var(--margins-2xl) 0 var(--margins-lg);
}
img:nth-child(2) {
filter: var(--session-logo-text-current-filter);
margin-bottom: var(--margins-xl);
}

@ -6,6 +6,7 @@ import { SettingsKey } from '../data/settings-key';
import { getOppositeTheme, isThemeMismatched } from '../util/theme';
import { THEME_GLOBALS, setThemeValues } from './globals';
import { switchThemeTo } from './switchTheme';
import { Storage } from '../util/storage';
export async function ensureThemeConsistency(): Promise<boolean> {
const theme = window.Events.getThemeSetting();
@ -63,7 +64,9 @@ export const SessionTheme = ({
useMount(() => {
setThemeValues(THEME_GLOBALS);
if (runSetup) {
void setupTheme();
void Storage.onready(() => {
void setupTheme();
});
}
});
return children;

Loading…
Cancel
Save