From 67c8e21bd834bc3f3dab34e47da8c4758d4cacf0 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 21 Feb 2025 18:06:32 -0600 Subject: [PATCH 1/2] Delay auto-update until all operations have completed --- src/UniGetUI/AutoUpdater.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UniGetUI/AutoUpdater.cs b/src/UniGetUI/AutoUpdater.cs index b3bbf58e60..c6ec2292ef 100644 --- a/src/UniGetUI/AutoUpdater.cs +++ b/src/UniGetUI/AutoUpdater.cs @@ -9,6 +9,7 @@ using UniGetUI.Core.Logging; using UniGetUI.Core.SettingsEngine; using UniGetUI.Core.Tools; +using UniGetUI.Interface; using UniGetUI.Interface.Enums; namespace UniGetUI; @@ -262,11 +263,12 @@ private static async Task PrepairToLaunchInstaller(string installerLocatio } else { - Logger.Debug("Waiting for mainWindow to be closed or for user to trigger the update from the notification..."); + Logger.Debug("Waiting for mainWindow to be closed, operations to complete, or for user to trigger the update from the notification..."); while ( !ReleaseLockForAutoupdate_Window && !ReleaseLockForAutoupdate_Notification && - !ReleaseLockForAutoupdate_UpdateBanner) + !ReleaseLockForAutoupdate_UpdateBanner && + MainApp.Operations._operationList.Count == 0) { await Task.Delay(100); } From 381d2bbcb074abb08daa4a87e8d9551b9ced5093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Wed, 26 Feb 2025 19:25:52 +0100 Subject: [PATCH 2/2] Use AreThereRunningOperations() method --- src/UniGetUI/AutoUpdater.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UniGetUI/AutoUpdater.cs b/src/UniGetUI/AutoUpdater.cs index c6ec2292ef..129238bd6b 100644 --- a/src/UniGetUI/AutoUpdater.cs +++ b/src/UniGetUI/AutoUpdater.cs @@ -268,7 +268,7 @@ private static async Task PrepairToLaunchInstaller(string installerLocatio !ReleaseLockForAutoupdate_Window && !ReleaseLockForAutoupdate_Notification && !ReleaseLockForAutoupdate_UpdateBanner && - MainApp.Operations._operationList.Count == 0) + MainApp.Operations.AreThereRunningOperations()) { await Task.Delay(100); }