mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-17 07:36:59 +00:00
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:
parent
f2105d6040
commit
84f26f7276
20 changed files with 185 additions and 156 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue