summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-07-07 12:52:46 +0200
committerErik Larkö <erik@mullvad.net>2017-07-07 16:29:02 +0200
commitea25ebc2cdf38fd128a817072e34a0518ea0417c (patch)
tree32717a8b1f05a2adf6a04955c39657988dadeaee /app
parent3d74d593111953ba7e79eed62447edbb054a9fca (diff)
downloadmullvadvpn-ea25ebc2cdf38fd128a817072e34a0518ea0417c.tar.xz
mullvadvpn-ea25ebc2cdf38fd128a817072e34a0518ea0417c.zip
Remove persistent storage
Diffstat (limited to 'app')
-rw-r--r--app/app.js18
-rw-r--r--app/redux/store.js3
2 files changed, 1 insertions, 20 deletions
diff --git a/app/app.js b/app/app.js
index f829e4bd29..7710ff1acf 100644
--- a/app/app.js
+++ b/app/app.js
@@ -10,11 +10,8 @@ import { webFrame, ipcRenderer } from 'electron';
import log from 'electron-log';
import makeRoutes from './routes';
import configureStore from './redux/store';
-import accountActions from './redux/account/actions';
-import connectionActions from './redux/connection/actions';
import { Backend } from './lib/backend';
-import type { LoginState } from './redux/account/reducers';
import type { ConnectionState } from './redux/connection/reducers';
import type { TrayIconType } from './lib/tray-icon-manager';
@@ -64,21 +61,6 @@ updateTrayIcon();
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
-// reset login state if user quit the app during login
-if((['logging in', 'failed']: Array<LoginState>).includes(store.getState().account.status)) {
- store.dispatch(accountActions.loginChange({
- status: 'none'
- }));
-}
-
-// reset connection state if user quit the app when logging in
-if(store.getState().connection.status === 'logging in') {
- store.dispatch(connectionActions.connectionChange({
- status: 'disconnected'
- }));
-}
-
-
// disable smart pinch.
webFrame.setZoomLevelLimits(1, 1);
diff --git a/app/redux/store.js b/app/redux/store.js
index 2f08a462eb..5d12d9af6c 100644
--- a/app/redux/store.js
+++ b/app/redux/store.js
@@ -1,7 +1,6 @@
// @flow
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { routerMiddleware, routerReducer, push, replace } from 'react-router-redux';
-import persistState from 'redux-localstorage';
import thunk from 'redux-thunk';
import account from './account/reducers.js';
@@ -52,7 +51,7 @@ export default function configureStore(initialState: ?ReduxState, routerHistory:
return compose;
})();
- const enhancer = composeEnhancers(applyMiddleware(...middlewares), persistState());
+ const enhancer = composeEnhancers(applyMiddleware(...middlewares));
const rootReducer = combineReducers(reducers);
if(initialState) {
return createStore(rootReducer, initialState, enhancer);