mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Release Profiles, Frontend updates (#580)
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
This commit is contained in:
+9
-1
@@ -1,6 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import persistState from 'redux-localstorage';
|
||||
import actions from 'Store/Actions';
|
||||
import migrate from 'Store/Migrators/migrate';
|
||||
|
||||
const columnPaths = [];
|
||||
|
||||
@@ -90,4 +91,11 @@ const config = {
|
||||
key: 'lidarr'
|
||||
};
|
||||
|
||||
export default persistState(paths, config);
|
||||
export default function createPersistState() {
|
||||
// Migrate existing local storage before proceeding
|
||||
const persistedState = JSON.parse(localStorage.getItem(config.key));
|
||||
migrate(persistedState);
|
||||
localStorage.setItem(config.key, serialize(persistedState));
|
||||
|
||||
return persistState(paths, config);
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { applyMiddleware, compose } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { routerMiddleware } from 'react-router-redux';
|
||||
import createSentryMiddleware from './createSentryMiddleware';
|
||||
import persistState from './persistState';
|
||||
import createPersistState from './createPersistState';
|
||||
|
||||
export default function(history) {
|
||||
const middlewares = [];
|
||||
@@ -20,6 +20,6 @@ export default function(history) {
|
||||
|
||||
return composeEnhancers(
|
||||
applyMiddleware(...middlewares),
|
||||
persistState
|
||||
createPersistState()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user