From 42124299cebbe1515235bde332bfd20a64f0537e Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Sun, 2 Jun 2024 16:25:46 -0700 Subject: [PATCH] feat: show dialog while updating --- src/KubeUI/ViewModels/MainViewModel.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/KubeUI/ViewModels/MainViewModel.cs b/src/KubeUI/ViewModels/MainViewModel.cs index 27846e3f..d79bc3bb 100644 --- a/src/KubeUI/ViewModels/MainViewModel.cs +++ b/src/KubeUI/ViewModels/MainViewModel.cs @@ -243,8 +243,18 @@ private async Task CheckForUpdates() if (result == ContentDialogResult.Primary) { + ContentDialogSettings updatePrompt = new() + { + Content = "Updating, please wait...", + Title = "Updating", + IsPrimaryButtonEnabled = false, + IsSecondaryButtonEnabled = false + }; + + _ = _dialogService.ShowContentDialogAsync(this, updatePrompt); + um.DownloadUpdates(update); - um.ApplyUpdatesAndExit(update); + um.ApplyUpdatesAndRestart(update); } } }