Merge pull request #19098 from peppy/last-played

Add "last played" sort mode to song select
This commit is contained in:
Dan Balasescu
2022-07-13 22:44:50 +09:00
committed by GitHub
6 changed files with 47 additions and 1 deletions

View File

@ -81,6 +81,9 @@ namespace osu.Game.Screens.Select.Carousel
case SortMode.DateAdded:
return otherSet.BeatmapSet.DateAdded.CompareTo(BeatmapSet.DateAdded);
case SortMode.LastPlayed:
return -compareUsingAggregateMax(otherSet, b => (b.LastPlayed ?? DateTimeOffset.MinValue).ToUnixTimeSeconds());
case SortMode.BPM:
return compareUsingAggregateMax(otherSet, b => b.BPM);

View File

@ -23,6 +23,9 @@ namespace osu.Game.Screens.Select.Filter
[Description("Date Added")]
DateAdded,
[Description("Last Played")]
LastPlayed,
[LocalisableDescription(typeof(BeatmapsStrings), nameof(BeatmapsStrings.ListingSearchSortingDifficulty))]
Difficulty,