From 3eeefd5b7e8708894c26474cf3868fc54e662f61 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Thu, 18 Jan 2024 16:13:48 -0800 Subject: [PATCH] Fix changelog stream user count only accounting for latest build --- osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs | 3 +++ osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs b/osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs index 76d1941d9d..dac72f2488 100644 --- a/osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs +++ b/osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs @@ -28,6 +28,9 @@ namespace osu.Game.Online.API.Requests.Responses [JsonProperty("latest_build")] public APIChangelogBuild LatestBuild { get; set; } + [JsonProperty("user_count")] + public int UserCount { get; set; } + public bool Equals(APIUpdateStream other) => Id == other?.Id; internal static readonly Dictionary KNOWN_STREAMS = new Dictionary diff --git a/osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs b/osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs index 08ea373fb1..30273d2405 100644 --- a/osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs +++ b/osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs @@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Changelog protected override LocalisableString AdditionalText => Value.LatestBuild.DisplayVersion; - protected override LocalisableString InfoText => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null; + protected override LocalisableString InfoText => Value.UserCount > 0 ? $"{"user".ToQuantity(Value.UserCount, "N0")} online" : null; protected override Color4 GetBarColour(OsuColour colours) => Value.Colour; }