quintodrome/ui/src/reducers
Deluan Quintão 395a36e10f
fix(ui): fix library selection state for single-library users (#4686)
* fix: validate library selection state for single-library users

Fixes issues where users with a single library see no content when
selectedLibraries in localStorage contains library IDs they no longer
have access to (e.g., after removing libraries or switching accounts).

Changes:
- libraryReducer: Validate selectedLibraries when SET_USER_LIBRARIES
  is dispatched, filtering out invalid IDs and resetting to empty for
  single-library users (empty means 'all accessible libraries')
- wrapperDataProvider: Add defensive validation in getSelectedLibraries
  to check against current user libraries before applying filters
- Add comprehensive test coverage for reducer validation logic

Fixes #4553, #4508, #4569

* style: format code with prettier
2025-11-15 17:42:28 -05:00
..
activityReducer.js fix(ui): keep the NowPlayingPanel badge in sync. 2025-06-29 11:35:10 -04:00
activityReducer.test.js fix(ui): keep the NowPlayingPanel badge in sync. 2025-06-29 11:35:10 -04:00
albumView.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00
dialogReducer.js feat(ui) add Save Queue to Playlist (#4110) 2025-05-23 22:04:18 -04:00
index.js feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
libraryReducer.js fix(ui): fix library selection state for single-library users (#4686) 2025-11-15 17:42:28 -05:00
libraryReducer.test.js fix(ui): fix library selection state for single-library users (#4686) 2025-11-15 17:42:28 -05:00
playerReducer.js fix(ui): save play mode for player (#3315) 2024-09-27 13:13:22 -04:00
replayGainReducer.js Use same key for replaygain's preAmp (#3184) 2024-08-03 21:18:41 -04:00
settingsReducer.js Option to toggle fields in songs, albums & artists (#923) 2021-05-24 11:09:06 -04:00
themeReducer.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00