mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Convert advanced settings to zustand store
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
import { handleThunks } from 'Store/thunks';
|
||||
import createHandleActions from './Creators/createHandleActions';
|
||||
import autoTaggings from './Settings/autoTaggings';
|
||||
@@ -91,20 +90,9 @@ export const defaultState = {
|
||||
};
|
||||
|
||||
export const persistState = [
|
||||
'settings.advancedSettings',
|
||||
'settings.importListExclusions.pageSize'
|
||||
];
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const TOGGLE_ADVANCED_SETTINGS = 'settings/toggleAdvancedSettings';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const toggleAdvancedSettings = createAction(TOGGLE_ADVANCED_SETTINGS);
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
@@ -140,11 +128,6 @@ export const actionHandlers = handleThunks({
|
||||
// Reducers
|
||||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[TOGGLE_ADVANCED_SETTINGS]: (state, { payload }) => {
|
||||
return Object.assign({}, state, { advancedSettings: !state.advancedSettings });
|
||||
},
|
||||
|
||||
...autoTaggingSpecifications.reducers,
|
||||
...autoTaggings.reducers,
|
||||
...customFormatSpecifications.reducers,
|
||||
|
||||
Reference in New Issue
Block a user