Fixed a ban where a custom setting was mistakenly created when starting the game if it did not exist.

Now when starting the game, if a custom setting was created, the current game will be displayed in the settings window.
Code cleanup.
This commit is contained in:
Vova
2025-02-08 18:29:31 +10:00
parent a92475b8fd
commit 5f5c76107c
9 changed files with 55 additions and 60 deletions

View File

@@ -37,21 +37,6 @@ namespace Ryujinx.Ava.UI.Controls
AvaloniaXamlLoader.Load(this);
}
public void ToggleUserControl_Click(object sender, RoutedEventArgs args)
{
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
return;
viewModel.SelectedApplication.Favorite = !viewModel.SelectedApplication.Favorite;
ApplicationLibrary.LoadAndSaveMetaData(viewModel.SelectedApplication.IdString, appMetadata =>
{
appMetadata.Favorite = viewModel.SelectedApplication.Favorite;
});
viewModel.RefreshView();
}
public void ToggleFavorite_Click(object sender, RoutedEventArgs args)
{
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })