mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
fix(settings): normalize shared controls updates
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user