Better settings handling with localSettings (new!)
This commit is contained in:
1 parent
4c37f629bc
commit
da05cde721
5 files changed
+52
-6
No files matched your search
@@ -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