Skip to content

Commit

Permalink
Allow closing when all ops are done (fix #3233)
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Feb 4, 2025
1 parent e77661c commit c276eb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/UniGetUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Microsoft.Windows.AppNotifications;
using UniGetUI.Core.Classes;
using UniGetUI.Interface.Enums;
using UniGetUI.PackageEngine.Enums;
using UniGetUI.PackageEngine.PackageClasses;
using UniGetUI.Pages.DialogPages;

Expand Down Expand Up @@ -209,7 +210,8 @@ public async void HandleClosingEvent(AppWindow sender, AppWindowClosingEventArgs
}
else
{
if (MainApp.Operations._operationList.Count > 0)
if (MainApp.Operations._operationList.Any()
&& MainApp.Operations._operationList.Where(x => x.Operation.Status is OperationStatus.Running or OperationStatus.InQueue).Any())
{
args.Cancel = true;
ContentDialog d = new()
Expand Down

0 comments on commit c276eb6

Please sign in to comment.