language feature: field keyword & partial properties for observable properties in the UI

partial properties are from C# 13 but weren't usable for these properties
This commit is contained in:
GreemDev 2025-09-12 13:58:01 -05:00
parent f2105d6040
commit 84f26f7276
20 changed files with 185 additions and 156 deletions

View file

@ -91,10 +91,8 @@ namespace Ryujinx.Ava.UI.ViewModels
OnPropertyChanged(nameof(VisibleEntries));
}
[ObservableProperty] private bool _isRefreshing;
private bool _onlyShowForOwnedGames;
private bool _onlyShowPublicGames = true;
private bool _onlyShowJoinableGames = true;
[ObservableProperty]
public partial bool IsRefreshing { get; set; }
public async Task RefreshAsync()
{
@ -109,12 +107,12 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool OnlyShowForOwnedGames
{
get => _onlyShowForOwnedGames;
get;
set
{
OnPropertyChanging();
OnPropertyChanging(nameof(VisibleEntries));
_onlyShowForOwnedGames = value;
field = value;
OnPropertyChanged();
OnPropertyChanged(nameof(VisibleEntries));
}
@ -122,29 +120,29 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool OnlyShowPublicGames
{
get => _onlyShowPublicGames;
get;
set
{
OnPropertyChanging();
OnPropertyChanging(nameof(VisibleEntries));
_onlyShowPublicGames = value;
field = value;
OnPropertyChanged();
OnPropertyChanged(nameof(VisibleEntries));
}
}
} = true;
public bool OnlyShowJoinableGames
{
get => _onlyShowJoinableGames;
get;
set
{
OnPropertyChanging();
OnPropertyChanging(nameof(VisibleEntries));
_onlyShowJoinableGames = value;
field = value;
OnPropertyChanged();
OnPropertyChanged(nameof(VisibleEntries));
}
}
} = true;
public void NameSorting(int nameSort = 0)