1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

New: Save release filter, sort key, and sort order

This commit is contained in:
voltron4lyfe 2022-10-29 21:33:17 -07:00
parent e2eaf91aa7
commit 38cca059dd

View File

@ -213,7 +213,9 @@ export const defaultState = {
export const persistState = [ export const persistState = [
'releases.customFilters', 'releases.customFilters',
'releases.selectedFilterKey' 'releases.selectedFilterKey',
'releases.sortKey',
'releases.sortDirection'
]; ];
// //
@ -301,7 +303,16 @@ export const actionHandlers = handleThunks({
export const reducers = createHandleActions({ export const reducers = createHandleActions({
[CLEAR_RELEASES]: (state) => { [CLEAR_RELEASES]: (state) => {
return Object.assign({}, state, defaultState); return Object.assign(
{},
state,
defaultState,
{
sortDirection: state.sortDirection,
sortKey: state.sortKey,
selectedFilterKey: state.selectedFilterKey
}
);
}, },
[UPDATE_RELEASE]: (state, { payload }) => { [UPDATE_RELEASE]: (state, { payload }) => {