From 416b9e4e6f38d64113ed35654bf6435be44c0cda Mon Sep 17 00:00:00 2001 From: mcendu Date: Wed, 4 Mar 2020 14:28:18 +0800 Subject: [PATCH 1/3] fix beatmap status display --- osu.Game/Overlays/BeatmapSet/AuthorInfo.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs index 446a075ae4..e80034f494 100644 --- a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs +++ b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs @@ -59,7 +59,25 @@ namespace osu.Game.Overlays.BeatmapSet if (online.Ranked.HasValue) { - fields.Add(new Field("ranked", online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold))); + string verb = "ranked"; + + switch (online.Status) + { + case BeatmapSetOnlineStatus.Ranked: + verb = "ranked"; + break; + case BeatmapSetOnlineStatus.Approved: + verb = "approved"; + break; + case BeatmapSetOnlineStatus.Qualified: + verb = "qualified"; + break; + case BeatmapSetOnlineStatus.Loved: + verb = "loved"; + break; + } + + fields.Add(new Field(verb, online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold))); } else if (online.LastUpdated.HasValue) { From fbd0dfd71b6c889794197e6e747ef9a99a185273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9CNate?= Date: Wed, 4 Mar 2020 14:55:51 +0800 Subject: [PATCH 2/3] add blank lines --- osu.Game/Overlays/BeatmapSet/AuthorInfo.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs index e80034f494..f3bf0b8e5e 100644 --- a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs +++ b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs @@ -66,12 +66,15 @@ namespace osu.Game.Overlays.BeatmapSet case BeatmapSetOnlineStatus.Ranked: verb = "ranked"; break; + case BeatmapSetOnlineStatus.Approved: verb = "approved"; break; + case BeatmapSetOnlineStatus.Qualified: verb = "qualified"; break; + case BeatmapSetOnlineStatus.Loved: verb = "loved"; break; From eaa77bce142cb905b8be09fdf5ecf2e5bd2e8242 Mon Sep 17 00:00:00 2001 From: mcendu Date: Wed, 4 Mar 2020 16:43:35 +0800 Subject: [PATCH 3/3] Use ToString().ToLowerInvariant() * https://github.com/ppy/osu/pull/8128#issuecomment-594360083 --- osu.Game/Overlays/BeatmapSet/AuthorInfo.cs | 23 +--------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs index f3bf0b8e5e..31c1439c8f 100644 --- a/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs +++ b/osu.Game/Overlays/BeatmapSet/AuthorInfo.cs @@ -59,28 +59,7 @@ namespace osu.Game.Overlays.BeatmapSet if (online.Ranked.HasValue) { - string verb = "ranked"; - - switch (online.Status) - { - case BeatmapSetOnlineStatus.Ranked: - verb = "ranked"; - break; - - case BeatmapSetOnlineStatus.Approved: - verb = "approved"; - break; - - case BeatmapSetOnlineStatus.Qualified: - verb = "qualified"; - break; - - case BeatmapSetOnlineStatus.Loved: - verb = "loved"; - break; - } - - fields.Add(new Field(verb, online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold))); + fields.Add(new Field(online.Status.ToString().ToLowerInvariant(), online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold))); } else if (online.LastUpdated.HasValue) {