diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.js | 18 | ||||
| -rw-r--r-- | app/redux/store.js | 3 |
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); |
