fix: preserve custom background when switching away from custom theme

This commit is contained in:
Chad Curtis
2026-03-03 05:00:24 -06:00
parent 57bf09a701
commit fa0a88cc02
+1 -4
View File
@@ -73,13 +73,10 @@ export function useTheme() {
// Re-enable transitions after the browser has painted the new theme
requestAnimationFrame(() => noTransition.remove());
// Update local immediately — also clear any background from customTheme
// Update local immediately — preserve customTheme (including background) so it can be restored
updateConfig((currentConfig) => ({
...currentConfig,
theme,
customTheme: currentConfig.customTheme
? { ...currentConfig.customTheme, background: undefined }
: undefined,
}));
syncToEncrypted({ theme });
}, [config.themes, config.customTheme?.colors, updateConfig, syncToEncrypted]);