Skip to content

Commit 2074bbc

Browse files
authored
fix: If an update is already downloaded and waiting, emit the Ready event to show the update prompt again (#483)
1 parent 885e0ad commit 2074bbc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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)