summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/packages/desktop/src/renderer/app.js8
-rw-r--r--gui/packages/desktop/src/renderer/redux/daemon/actions.js24
-rw-r--r--gui/packages/desktop/src/renderer/redux/daemon/reducers.js33
-rw-r--r--gui/packages/desktop/src/renderer/redux/store.js8
4 files changed, 0 insertions, 73 deletions
diff --git a/gui/packages/desktop/src/renderer/app.js b/gui/packages/desktop/src/renderer/app.js
index 1e2ead161d..ebc32b9f81 100644
--- a/gui/packages/desktop/src/renderer/app.js
+++ b/gui/packages/desktop/src/renderer/app.js
@@ -24,7 +24,6 @@ import accountActions from './redux/account/actions';
import connectionActions from './redux/connection/actions';
import settingsActions from './redux/settings/actions';
import versionActions from './redux/version/actions';
-import daemonActions from './redux/daemon/actions';
import windowActions from './redux/window/actions';
import type { WindowShapeParameters } from '../main/window-controller';
@@ -59,7 +58,6 @@ export default class AppRenderer {
connection: bindActionCreators(connectionActions, dispatch),
settings: bindActionCreators(settingsActions, dispatch),
version: bindActionCreators(versionActions, dispatch),
- daemon: bindActionCreators(daemonActions, dispatch),
window: bindActionCreators(windowActions, dispatch),
history: bindActionCreators(
{
@@ -441,9 +439,6 @@ export default class AppRenderer {
}
async _onOpenConnection() {
- // save to redux that the app connected to daemon
- this._reduxActions.daemon.connected();
-
// reset the reconnect backoff when connection established.
this._reconnectBackoff.reset();
@@ -484,9 +479,6 @@ export default class AppRenderer {
const actions = this._reduxActions;
const history = this._memoryHistory;
- // save to redux that the app disconnected from daemon
- actions.daemon.disconnected();
-
// recover connection on error
if (error) {
log.debug(`Lost connection to daemon: ${error.message}`);
diff --git a/gui/packages/desktop/src/renderer/redux/daemon/actions.js b/gui/packages/desktop/src/renderer/redux/daemon/actions.js
deleted file mode 100644
index 904cb3bd61..0000000000
--- a/gui/packages/desktop/src/renderer/redux/daemon/actions.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// @flow
-
-export type DaemonConnectedAction = {
- type: 'DAEMON_CONNECTED',
-};
-export type DaemonDisconnectedAction = {
- type: 'DAEMON_DISCONNECTED',
-};
-
-export type DaemonAction = DaemonConnectedAction | DaemonDisconnectedAction;
-
-function connected(): DaemonConnectedAction {
- return {
- type: 'DAEMON_CONNECTED',
- };
-}
-
-function disconnected(): DaemonDisconnectedAction {
- return {
- type: 'DAEMON_DISCONNECTED',
- };
-}
-
-export default { connected, disconnected };
diff --git a/gui/packages/desktop/src/renderer/redux/daemon/reducers.js b/gui/packages/desktop/src/renderer/redux/daemon/reducers.js
deleted file mode 100644
index 5e9e707ff6..0000000000
--- a/gui/packages/desktop/src/renderer/redux/daemon/reducers.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// @flow
-
-import type { ReduxAction } from '../store';
-
-export type DaemonReduxState = {
- isConnected: boolean,
-};
-
-const initialState: DaemonReduxState = {
- isConnected: false,
-};
-
-export default function(
- state: DaemonReduxState = initialState,
- action: ReduxAction,
-): DaemonReduxState {
- switch (action.type) {
- case 'DAEMON_CONNECTED':
- return {
- ...state,
- isConnected: true,
- };
-
- case 'DAEMON_DISCONNECTED':
- return {
- ...state,
- isConnected: false,
- };
-
- default:
- return state;
- }
-}
diff --git a/gui/packages/desktop/src/renderer/redux/store.js b/gui/packages/desktop/src/renderer/redux/store.js
index 133402e590..961b14d4b6 100644
--- a/gui/packages/desktop/src/renderer/redux/store.js
+++ b/gui/packages/desktop/src/renderer/redux/store.js
@@ -13,8 +13,6 @@ import supportReducer from './support/reducers';
import supportActions from './support/actions';
import versionReducer from './version/reducers';
import versionActions from './version/actions';
-import daemonReducer from './daemon/reducers';
-import daemonActions from './daemon/actions';
import windowReducer from './window/reducers';
import windowActions from './window/actions';
@@ -25,7 +23,6 @@ import type { ConnectionReduxState } from './connection/reducers';
import type { SettingsReduxState } from './settings/reducers';
import type { SupportReduxState } from './support/reducers';
import type { VersionReduxState } from './version/reducers';
-import type { DaemonReduxState } from './daemon/reducers';
import type { WindowReduxState } from './window/reducers';
import type { AccountAction } from './account/actions';
@@ -33,7 +30,6 @@ import type { ConnectionAction } from './connection/actions';
import type { SettingsAction } from './settings/actions';
import type { SupportAction } from './support/actions';
import type { VersionAction } from './version/actions';
-import type { DaemonAction } from './daemon/actions';
import type { WindowAction } from './window/actions';
export type ReduxState = {
@@ -42,7 +38,6 @@ export type ReduxState = {
settings: SettingsReduxState,
support: SupportReduxState,
version: VersionReduxState,
- daemon: DaemonReduxState,
window: WindowReduxState,
};
@@ -52,7 +47,6 @@ export type ReduxAction =
| SettingsAction
| SupportAction
| VersionAction
- | DaemonAction
| WindowAction;
export type ReduxStore = Store<ReduxState, ReduxAction, ReduxDispatch>;
export type ReduxGetState = () => ReduxState;
@@ -70,7 +64,6 @@ export default function configureStore(
...settingsActions,
...supportActions,
...versionActions,
- ...daemonActions,
...windowActions,
pushRoute: (route) => push(route),
replaceRoute: (route) => replace(route),
@@ -82,7 +75,6 @@ export default function configureStore(
settings: settingsReducer,
support: supportReducer,
version: versionReducer,
- daemon: daemonReducer,
window: windowReducer,
};