forked from matrix/element-web
Allow deferring of Update Toast until the next morning
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
1fd74f22c8
commit
66272fc226
|
@ -275,8 +275,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return this._ipcCall('getConfig');
|
return this._ipcCall('getConfig');
|
||||||
}
|
}
|
||||||
|
|
||||||
async onUpdateDownloaded(ev, updateInfo) {
|
async onUpdateDownloaded(ev, {releaseNotes, releaseName}) {
|
||||||
showUpdateToast(await this.getAppVersion(), updateInfo, updateInfo.releaseNotes);
|
if (this.shouldShowUpdate(releaseName)) {
|
||||||
|
showUpdateToast(await this.getAppVersion(), releaseName, releaseNotes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getHumanReadableName(): string {
|
getHumanReadableName(): string {
|
||||||
|
|
|
@ -93,14 +93,6 @@ export default abstract class VectorBasePlatform extends BasePlatform {
|
||||||
startUpdater() {
|
startUpdater() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the currently running app to the latest available
|
|
||||||
* version and replace this instance of the app with the
|
|
||||||
* new version.
|
|
||||||
*/
|
|
||||||
installUpdate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a sensible default display name for the
|
* Get a sensible default display name for the
|
||||||
* device Vector is running on
|
* device Vector is running on
|
||||||
|
|
|
@ -140,7 +140,9 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
if (this.runningVersion === null) {
|
if (this.runningVersion === null) {
|
||||||
this.runningVersion = ver;
|
this.runningVersion = ver;
|
||||||
} else if (this.runningVersion !== ver) {
|
} else if (this.runningVersion !== ver) {
|
||||||
showUpdateToast(this.runningVersion, ver);
|
if (this.shouldShowUpdate(ver)) {
|
||||||
|
showUpdateToast(this.runningVersion, ver);
|
||||||
|
}
|
||||||
return { status: UpdateCheckStatus.Ready };
|
return { status: UpdateCheckStatus.Ready };
|
||||||
} else {
|
} else {
|
||||||
hideUpdateToast();
|
hideUpdateToast();
|
||||||
|
|
Loading…
Reference in New Issue