diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts index 4688426b..496d3c33 100644 --- a/src/hooks/useTheme.ts +++ b/src/hooks/useTheme.ts @@ -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]);