mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 08:33:55 +09:00
Merge pull request #22192 from stanriders/fix-group-badges
Fix `GroupBadge` crashing on `null` group colour
This commit is contained in:
@ -8,7 +8,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public class APIUserGroup
|
public class APIUserGroup
|
||||||
{
|
{
|
||||||
[JsonProperty(@"colour")]
|
[JsonProperty(@"colour")]
|
||||||
public string Colour { get; set; } = null!;
|
public string? Colour { get; set; }
|
||||||
|
|
||||||
[JsonProperty(@"has_listing")]
|
[JsonProperty(@"has_listing")]
|
||||||
public bool HasListings { get; set; }
|
public bool HasListings { get; set; }
|
||||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = group.ShortName,
|
Text = group.ShortName,
|
||||||
Colour = Color4Extensions.FromHex(group.Colour),
|
Colour = Color4Extensions.FromHex(group.Colour ?? Colour4.White.ToHex()),
|
||||||
Shadow = false,
|
Shadow = false,
|
||||||
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
|
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user