diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 227347030..bbfe80570 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -107,7 +107,7 @@ namespace Ryujinx.Ava.UI.ViewModels [ObservableProperty] private ApplicationContextMenu _gridAppContextMenu; [ObservableProperty] private bool _updateAvailable; - public static AsyncRelayCommand UpdateCommand => Commands.Create(async () => + public static AsyncRelayCommand UpdateCommand { get; } = Commands.Create(async () => { if (Updater.CanUpdate(true)) await Updater.BeginUpdateAsync(true); diff --git a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs index a0bcd1aa2..d1931ae2f 100644 --- a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs +++ b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs @@ -51,12 +51,8 @@ namespace Ryujinx.Ava.UI.Views.Main XciTrimmerMenuItem.Command = Commands.Create(XCITrimmerWindow.Show); AboutWindowMenuItem.Command = Commands.Create(AboutWindow.Show); CompatibilityListMenuItem.Command = Commands.Create(() => CompatibilityList.Show()); - - UpdateMenuItem.Command = Commands.Create(async () => - { - if (Updater.CanUpdate(true)) - await Updater.BeginUpdateAsync(true); - }); + + UpdateMenuItem.Command = MainWindowViewModel.UpdateCommand; FaqMenuItem.Command = SetupGuideMenuItem.Command =