修复批量操作时偶尔崩溃的问题

croire 3 years ago
parent 682e80ae0e
commit 591ea2cf06

@ -140,7 +140,8 @@ namespace DownKyi.ViewModels.DownloadManager
{ {
await Task.Run(() => await Task.Run(() =>
{ {
foreach (var item in DownloadedList) List<DownloadedItem> list = DownloadedList.ToList();
foreach (var item in list)
{ {
if (item != null && item.DialogService == null) if (item != null && item.DialogService == null)
{ {

@ -178,7 +178,8 @@ namespace DownKyi.ViewModels.DownloadManager
{ {
await Task.Run(() => await Task.Run(() =>
{ {
foreach (var item in DownloadingList) List<DownloadingItem> list = DownloadingList.ToList();
foreach (var item in list)
{ {
if (item != null && item.DialogService == null) if (item != null && item.DialogService == null)
{ {

Loading…
Cancel
Save