UI: AutoUpdateManager: Simplify setupByTaskInfo()

This commit is contained in:
Nodir Temirkhodjaev 2024-09-30 15:28:42 +05:00
parent 397eabfc18
commit d8d2f6dc65

View File

@ -186,7 +186,8 @@ void AutoUpdateManager::setupByTaskInfo(TaskInfoUpdateChecker *taskInfo)
setIsDownloaded(downloaded);
if (autoDownload() && isNewVersion() && !downloaded) {
const bool shouldDownload = (autoDownload() && isNewVersion());
if (shouldDownload && !downloaded) {
startDownload();
}
}