mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-02-21 15:20:41 +01:00
Merge pull request #386 from vector-im/matthew/fix-updates
Don't check for updates if we already have one downloaded and queued
This commit is contained in:
commit
9bd927fbb2
@ -28,7 +28,19 @@ function installUpdate(): void {
|
||||
|
||||
function pollForUpdates(): void {
|
||||
try {
|
||||
autoUpdater.checkForUpdates();
|
||||
// If we've already got a new update downloaded, then stop
|
||||
// trying to check for new ones, as according to the doc
|
||||
// at https://github.com/electron/electron/blob/main/docs/api/auto-updater.md#autoupdatercheckforupdates
|
||||
// we'll just keep re-downloading the same update.
|
||||
// As a hunch, this might also be causing
|
||||
// https://github.com/vector-im/element-web/issues/12433
|
||||
// due to the update checks colliding with the pending install
|
||||
// somehow
|
||||
if (!latestUpdateDownloaded) {
|
||||
autoUpdater.checkForUpdates();
|
||||
} else {
|
||||
console.log("Skipping update check as download already present");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Couldn\'t check for update', e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user