Skip to content

Commit dde95ef

Browse files
committed
Allow closing when all ops are done (fix #3233)
1 parent 7eda5c8 commit dde95ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/UniGetUI/MainWindow.xaml.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Microsoft.Windows.AppNotifications;
2222
using UniGetUI.Core.Classes;
2323
using UniGetUI.Interface.Enums;
24+
using UniGetUI.PackageEngine.Enums;
2425
using UniGetUI.PackageEngine.PackageClasses;
2526
using UniGetUI.Pages.DialogPages;
2627

@@ -209,7 +210,8 @@ public async void HandleClosingEvent(AppWindow sender, AppWindowClosingEventArgs
209210
}
210211
else
211212
{
212-
if (MainApp.Operations._operationList.Count > 0)
213+
if (MainApp.Operations._operationList.Any()
214+
&& MainApp.Operations._operationList.Where(x => x.Operation.Status is OperationStatus.Running or OperationStatus.InQueue).Any())
213215
{
214216
args.Cancel = true;
215217
ContentDialog d = new()

0 commit comments

Comments
 (0)