summaryrefslogtreecommitdiffhomepage
path: root/app/lib
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/backend.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js
index a4487f56a6..b4ac1c2574 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -198,8 +198,17 @@ export class Backend {
// emit event
this._emit('logout');
+ this._store.dispatch(accountActions.loginChange({
+ status: 'none',
+ accountNumber: null,
+ paidUntil: null,
+ }));
+
// disconnect user during logout
- return this.disconnect();
+ return this.disconnect()
+ .then( () => {
+ this._store.dispatch(push('/'));
+ });
})
.catch(e => {
log.info('Failed to logout', e);
@@ -238,9 +247,9 @@ export class Backend {
});
}
- disconnect() {
+ disconnect(): Promise<void> {
// @TODO: Failure modes
- this._ipc.disconnect()
+ return this._ipc.disconnect()
.then(() => {
// emit: disconnect
this._emit('disconnect');