Skip to content

Commit 7e50a19

Browse files
committed
Use injected window manager for upgrade dialog
Replace manual WindowManager instantiation with the injected _viewModelWindowManager for consistency with other dialogs.
1 parent fc26885 commit 7e50a19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Papercut.UI/ViewModels/MainViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,8 @@ await this.ShowMessageAsync("Update Not Available",
499499
// Create upgrade dialog view model
500500
var upgradeDialog = new UI.ViewModels.UpgradeDialogViewModel(currentVersion, newVersion, releaseNotesHtml);
501501

502-
// Get the window manager from DI and show the dialog manually
503-
var windowManager = new Caliburn.Micro.WindowManager();
504-
var dialogResult = await windowManager.ShowDialogAsync(upgradeDialog);
502+
// Show the dialog using the injected window manager
503+
var dialogResult = await this._viewModelWindowManager.ShowDialogAsync(upgradeDialog);
505504

506505
// Check user's choice
507506
if (upgradeDialog.UserChoice != UI.ViewModels.UpgradeChoice.Upgrade)

0 commit comments

Comments
 (0)