aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-08-26 22:09:27 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-08-26 22:09:27 +0200
commit04c169c56da24ecd694521989d039ec0e7d29b49 (patch)
treecacf7d03f6f4e256a76b1ac3078a040c2c14c547 /src/stores
parentRemove share popup (diff)
downloadferdium-app-04c169c56da24ecd694521989d039ec0e7d29b49.tar.gz
ferdium-app-04c169c56da24ecd694521989d039ec0e7d29b49.tar.zst
ferdium-app-04c169c56da24ecd694521989d039ec0e7d29b49.zip
Fix random logout issues
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js2
-rw-r--r--src/stores/GlobalErrorStore.js5
-rw-r--r--src/stores/NewsStore.js4
3 files changed, 7 insertions, 4 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 0311a11a3..2bfcdf640 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -53,6 +53,8 @@ export default class AppStore extends Store {
53 53
54 @observable isOnline = navigator.onLine; 54 @observable isOnline = navigator.onLine;
55 55
56 @observable authRequestFailed = false;
57
56 @observable timeOfflineStart; 58 @observable timeOfflineStart;
57 59
58 @observable updateStatus = null; 60 @observable updateStatus = null;
diff --git a/src/stores/GlobalErrorStore.js b/src/stores/GlobalErrorStore.js
index 7a85c2daa..8bdafb68c 100644
--- a/src/stores/GlobalErrorStore.js
+++ b/src/stores/GlobalErrorStore.js
@@ -24,9 +24,12 @@ export default class GlobalErrorStore extends Store {
24 this.response = {}; 24 this.response = {};
25 } 25 }
26 if (this.error.status === 401) { 26 if (this.error.status === 401) {
27 this.actions.user.logout({ serverLogout: true }); 27 window.ferdi.stores.app.authRequestFailed = true;
28 // this.actions.user.logout({ serverLogout: true });
28 } 29 }
29 } 30 }
31 } else {
32 window.ferdi.stores.app.authRequestFailed = false;
30 } 33 }
31 }); 34 });
32} 35}
diff --git a/src/stores/NewsStore.js b/src/stores/NewsStore.js
index 43edeba8e..86e092592 100644
--- a/src/stores/NewsStore.js
+++ b/src/stores/NewsStore.js
@@ -29,9 +29,7 @@ export default class NewsStore extends Store {
29 } 29 }
30 30
31 @computed get latest() { 31 @computed get latest() {
32 // TODO: fix random logout issues and reactivate news 32 return this.latestNewsRequest.execute().result || [];
33 // return this.latestNewsRequest.execute().result || [];
34 return [];
35 } 33 }
36 34
37 // Actions 35 // Actions