diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-07-28 07:28:10 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-08-08 11:47:05 +0200 |
| commit | c6f83d7793bc5f50cef7f708ccb7da7601291a23 (patch) | |
| tree | 20ba7483b2db7cf5947af66c5efabfa0d21b23fd /app/lib | |
| parent | 63edffdd0def243f5087039ddaaf3aba3572d8f6 (diff) | |
| download | mullvadvpn-c6f83d7793bc5f50cef7f708ccb7da7601291a23.tar.xz mullvadvpn-c6f83d7793bc5f50cef7f708ccb7da7601291a23.zip | |
RPC notification actions
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/backend.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index 02ab2717f0..e8c8cbd464 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -276,9 +276,17 @@ export class Backend { log.info('Got new state from backend', newState); const newStatus = this._securityStateToConnectionState(newState); - this._store.dispatch(connectionActions.connectionChange({ - status: newStatus, - })); + switch(newStatus) { + case 'connecting': + this._store.dispatch(connectionActions.connecting()); + break; + case 'connected': + this._store.dispatch(connectionActions.connected()); + break; + case 'disconnected': + this._store.dispatch(connectionActions.disconnected()); + break; + } this.sync(); }); |
