diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stores/AppStore.js | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 2698749fc..cdb8586ca 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -162,27 +162,29 @@ export default class AppStore extends Store { | |||
162 | // Check for an update in 30s (need a delay to prevent Squirrel Installer lock file issues) | 162 | // Check for an update in 30s (need a delay to prevent Squirrel Installer lock file issues) |
163 | setTimeout(() => this._checkForUpdates(), ms('30s')); | 163 | setTimeout(() => this._checkForUpdates(), ms('30s')); |
164 | ipcRenderer.on('autoUpdate', (event, data) => { | 164 | ipcRenderer.on('autoUpdate', (event, data) => { |
165 | if (data.available) { | 165 | if (this.updateStatus !== this.updateStatusTypes.FAILED) { |
166 | this.updateStatus = this.updateStatusTypes.AVAILABLE; | 166 | if (data.available) { |
167 | if (isMac && this.stores.settings.app.automaticUpdates) { | 167 | this.updateStatus = this.updateStatusTypes.AVAILABLE; |
168 | app.dock.bounce(); | 168 | if (isMac && this.stores.settings.app.automaticUpdates) { |
169 | app.dock.bounce(); | ||
170 | } | ||
169 | } | 171 | } |
170 | } | ||
171 | 172 | ||
172 | if (data.available !== undefined && !data.available) { | 173 | if (data.available !== undefined && !data.available) { |
173 | this.updateStatus = this.updateStatusTypes.NOT_AVAILABLE; | 174 | this.updateStatus = this.updateStatusTypes.NOT_AVAILABLE; |
174 | } | 175 | } |
175 | 176 | ||
176 | if (data.downloaded) { | 177 | if (data.downloaded) { |
177 | this.updateStatus = this.updateStatusTypes.DOWNLOADED; | 178 | this.updateStatus = this.updateStatusTypes.DOWNLOADED; |
178 | if (isMac && this.stores.settings.app.automaticUpdates) { | 179 | if (isMac && this.stores.settings.app.automaticUpdates) { |
179 | app.dock.bounce(); | 180 | app.dock.bounce(); |
181 | } | ||
180 | } | 182 | } |
181 | } | ||
182 | 183 | ||
183 | if (data.error) { | 184 | if (data.error) { |
184 | console.log('Updater error:', data.error); | 185 | console.log('Updater error:', data.error); |
185 | this.updateStatus = this.updateStatusTypes.FAILED; | 186 | this.updateStatus = this.updateStatusTypes.FAILED; |
187 | } | ||
186 | } | 188 | } |
187 | }); | 189 | }); |
188 | 190 | ||