Skip to content

Commit 132b053

Browse files
Fix UpdateableTeamFlag compilation error in tests: Add hideOnNull support
1 parent c0e7b27 commit 132b053

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

osu.Game/Users/Drawables/UpdateableTeamFlag.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ public APITeam? Team
3333

3434
protected override double LoadDelay => 200;
3535

36-
public UpdateableTeamFlag(APITeam? team = null)
36+
private readonly bool hideOnNull;
37+
38+
public UpdateableTeamFlag(APITeam? team = null, bool hideOnNull = true)
3739
{
40+
this.hideOnNull = hideOnNull;
3841
Team = team;
3942

4043
Masking = true;
@@ -50,7 +53,7 @@ public UpdateableTeamFlag(APITeam? team = null)
5053

5154
// Generally we just want team flags to disappear if the user doesn't have one.
5255
// This also handles fill flow cases and avoids spacing being added for non-displaying flags.
53-
public override bool IsPresent => base.IsPresent && Team != null;
56+
public override bool IsPresent => base.IsPresent && (!hideOnNull || Team != null);
5457

5558
protected override void Update()
5659
{

0 commit comments

Comments
 (0)