silently handle errors during ui draw of download ui

This commit is contained in:
Stanley Dimant
2022-09-10 15:40:31 +02:00
parent 8d1324250f
commit 4f19589386

View File

@@ -80,6 +80,8 @@ public class DownloadUi : Window, IDisposable
var basePosition = ImGui.GetWindowPos() + ImGui.GetWindowContentRegionMin();
try
{
if (_apiController.CurrentUploads.Any())
{
var currentUploads = _apiController.CurrentUploads.ToList();
@@ -100,7 +102,11 @@ public class DownloadUi : Window, IDisposable
UiShared.Color(255, 255, 255, 255), UiShared.Color(0, 0, 0, 255), 2);
}
}
catch { }
try
{
if (_apiController.CurrentDownloads.Any())
{
var currentDownloads = _apiController.CurrentDownloads.Where(d => d.Value != null && d.Value.Any()).ToList().SelectMany(k => k.Value).ToList();
@@ -120,4 +126,6 @@ public class DownloadUi : Window, IDisposable
UiShared.Color(255, 255, 255, 255), UiShared.Color(0, 0, 0, 255), 2);
}
}
catch { }
}
}