Better settings handling with localSettings (new!)
This commit is contained in:
@@ -24,7 +24,11 @@ addLocaleData(localeData);
|
||||
|
||||
const store = configureStore();
|
||||
const initialState = JSON.parse(document.getElementById('initial-state').textContent);
|
||||
if (localStorage) initialState.layout = localStorage.getItem('mastodon-layout');
|
||||
try {
|
||||
initialState.localSettings = JSON.parse(localStorage.getItem('mastodon-settings'));
|
||||
} catch (e) {
|
||||
initialState.localSettings = {};
|
||||
}
|
||||
store.dispatch(hydrateStore(initialState));
|
||||
|
||||
export default class Mastodon extends React.PureComponent {
|
||||
|
Reference in New Issue
Block a user