handle download cancellation better

This commit is contained in:
Stanley Dimant
2022-07-10 21:51:42 +02:00
parent 98c1802d63
commit 2307b43c65
7 changed files with 47 additions and 42 deletions

View File

@@ -101,7 +101,7 @@ public class DownloadUi : Window, IDisposable
if (_apiController.CurrentDownloads.Any())
{
var currentDownloads = _apiController.CurrentDownloads.ToList();
var currentDownloads = _apiController.CurrentDownloads.SelectMany(k => k.Value).ToList();
var multBase = currentDownloads.Any() ? 0 : 2;
var doneDownloads = currentDownloads.Count(c => c.IsTransferred);
var totalDownloads = currentDownloads.Count;