private void HandleNextDownload(Task <DownloadFile> task) { _downloads.Remove(task.Result); if (_downloads.Count <= 0) { Main.menuMode = gotoMenu; OnDownloadsComplete?.Invoke(); return; } DownloadMods(); }
private void HandleNextDownload(Task <DownloadFile> task) { bool hasError = task.Exception != null; _downloads.Remove(_downloadFile); if (_downloads.Count <= 0 || hasError) { if (hasError) { Logging.tML.Error($"There was a problem downloading the mod {_downloadFile.DisplayText}", task.Exception); } Main.menuMode = gotoMenu; OnDownloadsComplete?.Invoke(); return; } DownloadMods(); }