diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-04-13 13:50:53 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-04-13 13:50:53 +0200 |
commit | 8063f11cae51ac738dbbeeec5961e346ab2dd3db (patch) | |
tree | 6c2cef10316a253a8c2dc9b9aa3ca54885d67589 /src/features/settingsWS | |
parent | Polish team screen (diff) | |
download | ferdium-app-8063f11cae51ac738dbbeeec5961e346ab2dd3db.tar.gz ferdium-app-8063f11cae51ac738dbbeeec5961e346ab2dd3db.tar.zst ferdium-app-8063f11cae51ac738dbbeeec5961e346ab2dd3db.zip |
Only connect when user is already initialized
Diffstat (limited to 'src/features/settingsWS')
-rwxr-xr-x | src/features/settingsWS/store.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/features/settingsWS/store.js b/src/features/settingsWS/store.js index 3cc74d8ef..8e1d455f1 100755 --- a/src/features/settingsWS/store.js +++ b/src/features/settingsWS/store.js | |||
@@ -22,8 +22,9 @@ export class SettingsWSStore extends Store { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | setup() { | 24 | setup() { |
25 | this.connect(); | 25 | reaction(() => this.stores.user.data.id, this.connect.bind(this), { |
26 | 26 | fireImmediately: true, | |
27 | }); | ||
27 | reaction(() => !this.connected, this.reconnect.bind(this)); | 28 | reaction(() => !this.connected, this.reconnect.bind(this)); |
28 | } | 29 | } |
29 | 30 | ||