forked from matrix/element-web
add clearer concept of timeout vs error
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> (cherry picked from commit 104c804) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
b95ad701af
commit
3ebd90565c
|
@ -45,13 +45,16 @@ export default React.createClass({
|
||||||
let message;
|
let message;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case updateStateEnum.ERROR:
|
case updateStateEnum.ERROR:
|
||||||
message = 'Error encountered when checking for an update';
|
message = 'Error encountered when checking for an update.';
|
||||||
|
break;
|
||||||
|
case updateStateEnum.TIMEOUT:
|
||||||
|
message = 'Update Check timed out, try again later.';
|
||||||
break;
|
break;
|
||||||
case updateStateEnum.NOTAVAILABLE:
|
case updateStateEnum.NOTAVAILABLE:
|
||||||
message = 'No update found';
|
message = 'No update found.';
|
||||||
break;
|
break;
|
||||||
case updateStateEnum.DOWNLOADING:
|
case updateStateEnum.DOWNLOADING:
|
||||||
message = 'Update is being downloaded';
|
message = 'Update is being downloaded.';
|
||||||
done = false;
|
done = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return deferred.promise.timeout(10000).catch(() => {
|
return deferred.promise.timeout(10000).catch(() => {
|
||||||
electron.autoUpdater.removeListener('update-not-available', _onUpdateNotAvailable);
|
electron.autoUpdater.removeListener('update-not-available', _onUpdateNotAvailable);
|
||||||
electron.autoUpdater.removeListener('update-available', _onUpdateAvailable);
|
electron.autoUpdater.removeListener('update-available', _onUpdateAvailable);
|
||||||
return updateStateEnum.ERROR;
|
return updateStateEnum.TIMEOUT;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ import Favico from 'favico.js';
|
||||||
|
|
||||||
export const updateStateEnum = {
|
export const updateStateEnum = {
|
||||||
ERROR: 'ERROR',
|
ERROR: 'ERROR',
|
||||||
|
TIMEOUT: 'TIMEOUT',
|
||||||
NOTAVAILABLE: 'NOTAVAILABLE',
|
NOTAVAILABLE: 'NOTAVAILABLE',
|
||||||
DOWNLOADING: 'DOWNLOADING',
|
DOWNLOADING: 'DOWNLOADING',
|
||||||
READY: 'READY',
|
READY: 'READY',
|
||||||
|
|
Loading…
Reference in New Issue