From 4ef2e04bf88da206759b391ce42b624dc685ef17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Thu, 12 Feb 2026 11:38:49 +0100 Subject: [PATCH] nicolium: fix theme changes overriding default settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/features/preferences/index.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/features/preferences/index.tsx b/packages/pl-fe/src/features/preferences/index.tsx index dc97199e0..7f868faec 100644 --- a/packages/pl-fe/src/features/preferences/index.tsx +++ b/packages/pl-fe/src/features/preferences/index.tsx @@ -141,12 +141,23 @@ const Preferences = () => { const onBrandColorChange = (newBrandColor: string) => { if (newBrandColor === brandColor) return; - dispatch(changeSetting(['theme', 'brandColor'], newBrandColor, { showAlert: true, save: false })); + const theme = settings.theme || frontendConfig.defaultSettings.theme; + + dispatch(changeSetting(['theme'], { + ...theme, + brandColor: newBrandColor, + }, { showAlert: true, save: false })); + debouncedSave(dispatch); }; const onInterfaceSizeChange = (value: number) => { - dispatch(changeSetting(['theme', 'interfaceSize'], INTERFACE_SIZES[value], { showAlert: true, save: false })); + const theme = settings.theme || frontendConfig.defaultSettings.theme; + + dispatch(changeSetting(['theme'], { + ...theme, + interfaceSize: INTERFACE_SIZES[value], + }, { showAlert: true, save: false })); debouncedSave(dispatch); };