Skip to content

Commit

Permalink
feat: show dialog while updating
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic committed Jun 2, 2024
1 parent 44e10c1 commit 4212429
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/KubeUI/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 4212429

Please sign in to comment.