Fix multiple auto-updates in Electron (#4148)
This commit is contained in:
parent
30b24f7ed9
commit
cf4d8c4634
@ -64,13 +64,11 @@ async function checkForUpdates(): Promise<void> {
|
|||||||
if (await shouldPerformAutoUpdate()) {
|
if (await shouldPerformAutoUpdate()) {
|
||||||
if (getIsAutoUpdateEnabled()) {
|
if (getIsAutoUpdateEnabled()) {
|
||||||
autoUpdater.checkForUpdates();
|
autoUpdater.checkForUpdates();
|
||||||
|
} else {
|
||||||
return;
|
BrowserWindow.getAllWindows().forEach((window) => {
|
||||||
|
window.webContents.send(ElectronEvent.UPDATE_AVAILABLE);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserWindow.getAllWindows().forEach((window) => {
|
|
||||||
window.webContents.send(ElectronEvent.UPDATE_AVAILABLE);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await pause(CHECK_UPDATE_INTERVAL);
|
await pause(CHECK_UPDATE_INTERVAL);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user