feat: allow active update downloads to be canceled

Keep the dialog cancel action available during update downloads, abort the active network stream, and surface a clean canceled state with retry support. Normalize cancellation across updater, main process, renderer, and translations with regression coverage.
This commit is contained in:
Sucukdeluxe
2026-08-20 23:57:54 +02:00
parent bbdfc37fdc
commit 577e1dd9c9
7 changed files with 136 additions and 26 deletions
+7 -6
View File
@@ -2897,18 +2897,19 @@ ipcMain.handle('app:install-update', async () => {
try {
return await updatePreparationPromise;
} catch (error) {
rejectPendingUpdate(error);
safeSend('app:update-progress', { stage: 'error', error: error.message });
return { started: false, error: error.message };
const canceled = error && error.message === 'Update abgebrochen';
if (!canceled) {
rejectPendingUpdate(error);
safeSend('app:update-progress', { stage: 'error', error: error.message });
}
return { started: false, canceled, error: error.message };
} finally {
updatePreparationPromise = null;
}
});
ipcMain.handle('app:abort-update', () => {
abortUpdate();
rejectPendingUpdate(new Error('Update abgebrochen'));
return true;
return abortUpdate();
});
ipcMain.handle('app:get-version', () => {