summaryrefslogtreecommitdiffstats
path: root/web/react/stores/error_store.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-01 08:27:57 -0500
committerChristopher Speller <crspeller@gmail.com>2016-03-01 08:27:57 -0500
commita66e9513ad48089f16469509ab4fad633f8eaac5 (patch)
tree8ec3b1be136733b7be7f6aeee2e91b81cebf245c /web/react/stores/error_store.jsx
parent39c83f70fc227e9bb88c24b15ff2b8748e9d670b (diff)
parent6c18e13f8ae4d8785b598adc0cb3e93c27cec849 (diff)
downloadchat-a66e9513ad48089f16469509ab4fad633f8eaac5.tar.gz
chat-a66e9513ad48089f16469509ab4fad633f8eaac5.tar.bz2
chat-a66e9513ad48089f16469509ab4fad633f8eaac5.zip
Merge pull request #2276 from mattermost/PLT-2030
PLT-2030 fixing error handling
Diffstat (limited to 'web/react/stores/error_store.jsx')
-rw-r--r--web/react/stores/error_store.jsx20
1 files changed, 15 insertions, 5 deletions
diff --git a/web/react/stores/error_store.jsx b/web/react/stores/error_store.jsx
index 5afcefd12..6928b1e59 100644
--- a/web/react/stores/error_store.jsx
+++ b/web/react/stores/error_store.jsx
@@ -18,7 +18,6 @@ class ErrorStoreClass extends EventEmitter {
this.emitChange = this.emitChange.bind(this);
this.addChangeListener = this.addChangeListener.bind(this);
this.removeChangeListener = this.removeChangeListener.bind(this);
- this.handledError = this.handledError.bind(this);
this.getLastError = this.getLastError.bind(this);
this.storeLastError = this.storeLastError.bind(this);
}
@@ -35,10 +34,6 @@ class ErrorStoreClass extends EventEmitter {
this.removeListener(CHANGE_EVENT, callback);
}
- handledError() {
- BrowserStore.removeItem('last_error');
- }
-
getLastError() {
return BrowserStore.getItem('last_error');
}
@@ -47,8 +42,23 @@ class ErrorStoreClass extends EventEmitter {
BrowserStore.setItem('last_error', error);
}
+ getConnectionErrorCount() {
+ var count = BrowserStore.getItem('last_error_conn');
+
+ if (count == null) {
+ return 0;
+ }
+
+ return count;
+ }
+
+ setConnectionErrorCount(count) {
+ BrowserStore.setItem('last_error_conn', count);
+ }
+
clearLastError() {
BrowserStore.removeItem('last_error');
+ BrowserStore.removeItem('last_error_conn');
}
}