Install downloaded updates while in tray

This commit is contained in:
Fedor Indutny 2023-12-12 03:15:36 +01:00 committed by GitHub
parent c4521a063c
commit 12a2ec8dd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 87 additions and 24 deletions

View file

@ -1161,7 +1161,17 @@ async function readyForUpdates() {
settingsChannel !== undefined,
'SettingsChannel must be initialized'
);
await updater.start(settingsChannel, getLogger(), getMainWindow);
await updater.start({
settingsChannel,
logger: getLogger(),
getMainWindow,
canRunSilently: () => {
return (
systemTrayService?.isVisible() === true &&
mainWindow?.isVisible() === false
);
},
});
} catch (error) {
getLogger().error(
'Error starting update checks:',