Skip to content

Commit 1b72d83

Browse files
committed
If an update is already downloaded and waiting, emit the Ready event to show the update prompt again instead of checking with the autoUpdater.
1 parent 0b40a16 commit 1b72d83

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

apps/array/src/main/services/updates/service.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ export class UpdatesService extends TypedEventEmitter<UpdatesEvents> {
7676
return { success: false, error: "Already checking for updates" };
7777
}
7878

79+
// If an update is already downloaded and ready, show the prompt again
80+
// instead of checking (which would incorrectly report "up to date")
81+
if (this.updateReady) {
82+
log.info("Update already downloaded, showing prompt again", {
83+
downloadedVersion: this.downloadedVersion,
84+
});
85+
this.pendingNotification = true;
86+
this.flushPendingNotification();
87+
return { success: true };
88+
}
89+
7990
this.checkingForUpdates = true;
8091
this.emitStatus({ checking: true });
8192
this.performCheck();

0 commit comments

Comments
 (0)