diff options
author | Logan Stromberg <loganstromberg@gmail.com> | 2024-08-13 06:23:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 15:23:11 +0200 |
commit | 23fa5f4c9c0ee865dd0a4def3be1822e598c9a91 (patch) | |
tree | df67652eb1ffb666526d39f59c9206380d5df2f7 /src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs | |
parent | 4f75e26ec7e61e606f812bd0149eef69bdc8a4ea (diff) |
Fix arbitrary game ordering when sorting by Favorites (#7170)1.1.1375
* Fix arbitrary sorting by "Favorite" in the UI by making it the same as sorting alphabetically while giving favorites priority.
* Use a more engineered solution rather than string hacks.
* Address code style warnings. Add null checking. Make title name comparison case insensitive.
* one more style fix
---------
Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
Diffstat (limited to 'src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs')
-rw-r--r-- | src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 134e9030..bd9f165b 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -965,8 +965,8 @@ namespace Ryujinx.Ava.UI.ViewModels : SortExpressionComparer<ApplicationData>.Descending(app => app.FileSize), ApplicationSort.Path => IsAscending ? SortExpressionComparer<ApplicationData>.Ascending(app => app.Path) : SortExpressionComparer<ApplicationData>.Descending(app => app.Path), - ApplicationSort.Favorite => !IsAscending ? SortExpressionComparer<ApplicationData>.Ascending(app => app.Favorite) - : SortExpressionComparer<ApplicationData>.Descending(app => app.Favorite), + ApplicationSort.Favorite => IsAscending ? SortExpressionComparer<ApplicationData>.Ascending(app => new AppListFavoriteComparable(app)) + : SortExpressionComparer<ApplicationData>.Descending(app => new AppListFavoriteComparable(app)), _ => null, #pragma warning restore IDE0055 }; |