Add date submitted sorting

This commit is contained in:
Andrew Hong 2022-08-21 23:09:33 -04:00
parent 3ef6c60d1f
commit c6a739f5a8
2 changed files with 9 additions and 0 deletions

View File

@ -99,6 +99,12 @@ namespace osu.Game.Screens.Select.Carousel
case SortMode.Difficulty:
return compareUsingAggregateMax(otherSet, b => b.StarRating);
case SortMode.DateSubmitted:
if (BeatmapSet.DateSubmitted == null || otherSet.BeatmapSet.DateSubmitted == null)
return 0;
return otherSet.BeatmapSet.DateSubmitted.Value.CompareTo(BeatmapSet.DateSubmitted.Value);
}
}

View File

@ -20,6 +20,9 @@ namespace osu.Game.Screens.Select.Filter
[LocalisableDescription(typeof(SortStrings), nameof(SortStrings.ArtistTracksBpm))]
BPM,
[Description("Date Submitted")]
DateSubmitted,
[Description("Date Added")]
DateAdded,