This commit is contained in:
Alessandro Autiero
2025-03-23 23:17:20 +01:00
parent 5d8f6bf0fa
commit dc2d4c4377
2 changed files with 34 additions and 8 deletions

View File

@@ -105,14 +105,25 @@ class DllController extends GetxController {
duration: null
);
}
await Future.wait(
final result = await Future.wait(
[
downloadRebootDll(rebootBeforeS20DllFile, beforeS20Mirror.text, false),
downloadRebootDll(rebootAboveS20DllFile, aboveS20Mirror.text, true),
Future.delayed(const Duration(seconds: 1))
.then((_) => true)
],
eagerError: false
);
).then((values) => values.reduce((first, second) => first && second));
if(!result) {
status.value = UpdateStatus.error;
showRebootInfoBar(
translations.downloadDllAntivirus(antiVirusName ?? defaultAntiVirusName, "reboot"),
duration: infoBarLongDuration,
severity: InfoBarSeverity.error
);
infoBarEntry?.close();
return false;
}
timestamp.value = DateTime.now().millisecondsSinceEpoch;
status.value = UpdateStatus.success;
infoBarEntry?.close();