Fix multiple auto-updates in Electron (#4148)

This commit is contained in:
Alexander Zinchuk 2024-01-12 13:00:12 +01:00
parent 30b24f7ed9
commit cf4d8c4634

View File

@ -64,13 +64,11 @@ async function checkForUpdates(): Promise<void> {
if (await shouldPerformAutoUpdate()) {
if (getIsAutoUpdateEnabled()) {
autoUpdater.checkForUpdates();
return;
} else {
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);