Skip to content

Commit

Permalink
misc: chore: Use UpdateCommand instance for the normal Check for Upda…
Browse files Browse the repository at this point in the history
…tes button
  • Loading branch information
GreemDev committed Feb 11, 2025
1 parent 9cb5f56 commit 30fef8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public partial class MainWindowViewModel : BaseModel
[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);
Expand Down
8 changes: 2 additions & 6 deletions src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ public MainMenuBarView()
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 =
Expand Down

0 comments on commit 30fef8e

Please sign in to comment.