nicolium: fix theme changes overriding default settings

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-12 11:38:49 +01:00
parent 6eb67c45cd
commit 4ef2e04bf8

View File

@ -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);
};