fix(settings): normalize shared controls updates

This commit is contained in:
4gray committed 2026-07-17 13:07:38 +02:00
1 parent 3edb73fa2b
commit 90f448de75
2 files changed
+7

No files matched your search

@@ -170,6 +170,7 @@ describe('SettingsStore dashboard rail settings', () => {
webPlayerSharedControls: 'true' as unknown as boolean,
});
expect(store.webPlayerSharedControls?.()).toBe(false);
expect(storage.set).toHaveBeenCalledWith(
STORE_KEY.Settings,
expect.objectContaining({
@@ -153,6 +153,12 @@ export const SettingsStore = signalStore(
async updateSettings(settings: Partial<Settings>) {
patchState(store, {
...settings,
...(settings.webPlayerSharedControls !== undefined
? {
webPlayerSharedControls:
settings.webPlayerSharedControls === true,
}
: {}),
...(settings.dashboardRails !== undefined
? {
dashboardRails: normalizeDashboardRailsSettings(