diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-04-12 13:32:19 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-04-12 13:32:19 +0200 |
commit | f941074dd7520efb63e9507294df8c420715b9df (patch) | |
tree | 614d03296254f02fe93a67a5c3b2feef1446e3aa /src/stores/lib/Request.js | |
parent | Don't invalidate user request on componentWillMount (diff) | |
parent | feat(App): Update electron to 4.1.4 (diff) | |
download | ferdium-app-f941074dd7520efb63e9507294df8c420715b9df.tar.gz ferdium-app-f941074dd7520efb63e9507294df8c420715b9df.tar.zst ferdium-app-f941074dd7520efb63e9507294df8c420715b9df.zip |
Merge branch 'develop' into chore/streamline-dashboard
Diffstat (limited to 'src/stores/lib/Request.js')
-rw-r--r-- | src/stores/lib/Request.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stores/lib/Request.js b/src/stores/lib/Request.js index 04f528156..486de8a49 100644 --- a/src/stores/lib/Request.js +++ b/src/stores/lib/Request.js | |||
@@ -85,6 +85,8 @@ export default class Request { | |||
85 | return this.execute(...this._currentApiCall.args); | 85 | return this.execute(...this._currentApiCall.args); |
86 | } | 86 | } |
87 | 87 | ||
88 | retry = () => this.reload(); | ||
89 | |||
88 | isExecutingWithArgs(...args) { | 90 | isExecutingWithArgs(...args) { |
89 | return this.isExecuting && this._currentApiCall && isEqual(this._currentApiCall.args, args); | 91 | return this.isExecuting && this._currentApiCall && isEqual(this._currentApiCall.args, args); |
90 | } | 92 | } |
@@ -107,7 +109,7 @@ export default class Request { | |||
107 | Request._hooks.forEach(hook => hook(this)); | 109 | Request._hooks.forEach(hook => hook(this)); |
108 | } | 110 | } |
109 | 111 | ||
110 | reset() { | 112 | reset = () => { |
111 | this.result = null; | 113 | this.result = null; |
112 | this.isExecuting = false; | 114 | this.isExecuting = false; |
113 | this.isError = false; | 115 | this.isError = false; |
@@ -116,5 +118,5 @@ export default class Request { | |||
116 | this._promise = Promise; | 118 | this._promise = Promise; |
117 | 119 | ||
118 | return this; | 120 | return this; |
119 | } | 121 | }; |
120 | } | 122 | } |