1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Merge pull request #26626 from Joehuu/fix-changelog-stream-user-count

Fix changelog stream user count only accounting for latest build
This commit is contained in:
Dean Herbert 2024-01-19 14:11:59 +09:00 committed by GitHub
commit e669e28dc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -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<string, Color4> KNOWN_STREAMS = new Dictionary<string, Color4>

View File

@ -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;
}