Skip to content

Commit

Permalink
Always show placeholder on unknown / missing country
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 10, 2024
1 parent b026309 commit e887f93
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion osu.Game/Overlays/BeatmapSet/Scores/ScoreTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ private Drawable[] createContent(int index, ScoreInfo score)
new UpdateableFlag(score.User.CountryCode)
{
Size = new Vector2(19, 14),
ShowPlaceholderOnUnknown = false,
},
username,
#pragma warning disable 618
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Overlays/BeatmapSet/Scores/TopScoreUserSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public TopScoreUserSection()
Origin = Anchor.CentreLeft,
Size = new Vector2(19, 14),
Margin = new MarginPadding { Top = 3 }, // makes spacing look more even
ShowPlaceholderOnUnknown = false,
},
}
}
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Overlays/Profile/Header/TopHeaderContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ private void load(OverlayColourProvider colourProvider, OsuConfigManager configM
userFlag = new UpdateableFlag
{
Size = new Vector2(28, 20),
ShowPlaceholderOnUnknown = false,
},
userCountryContainer = new OsuHoverContainer
{
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Overlays/Rankings/Tables/RankingsTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ protected sealed override Drawable CreateHeader(int index, TableColumn column)
new UpdateableFlag(GetCountryCode(item))
{
Size = new Vector2(28, 20),
ShowPlaceholderOnUnknown = false,
},
CreateFlagContent(item)
}
Expand Down
8 changes: 0 additions & 8 deletions osu.Game/Users/Drawables/UpdateableFlag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public CountryCode CountryCode
}
}

/// <summary>
/// Whether to show a placeholder on unknown country.
/// </summary>
public bool ShowPlaceholderOnUnknown = true;

/// <summary>
/// Perform an action in addition to showing the country ranking.
/// This should be used to perform auxiliary tasks and not as a primary action for clicking a flag (to maintain a consistent UX).
Expand All @@ -57,9 +52,6 @@ private void load(OsuConfigManager config)

protected override Drawable? CreateDrawable(CountryCode countryCode)

Check failure on line 53 in osu.Game/Users/Drawables/UpdateableFlag.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Return type of 'CreateDrawable' can be non-nullable in osu.Game\Users\Drawables\UpdateableFlag.cs on line 53
{
if (countryCode == CountryCode.Unknown && !ShowPlaceholderOnUnknown)
return null;

return new Container
{
RelativeSizeAxes = Axes.Both,
Expand Down

0 comments on commit e887f93

Please sign in to comment.