Reapply "fix(app): more startup efficiency (#18985)"

This reverts commit cbe1337f24.
This commit is contained in:
Adam
2026-03-24 18:49:14 -05:00
parent 0dbfefa080
commit 2b0baf97bd
8 changed files with 240 additions and 128 deletions

View File

@@ -118,8 +118,11 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
createEffect(() => {
if (typeof document === "undefined") return
void loadFont().then((x) => x.ensureMonoFont(store.appearance?.font))
document.documentElement.style.setProperty("--font-family-mono", monoFontFamily(store.appearance?.font))
const id = store.appearance?.font ?? defaultSettings.appearance.font
if (id !== defaultSettings.appearance.font) {
void loadFont().then((x) => x.ensureMonoFont(id))
}
document.documentElement.style.setProperty("--font-family-mono", monoFontFamily(id))
})
return {