1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Merge pull request #27551 from EVAST9919/flag-tooltip-alloc

Reduce allocations while hovering `DrawableFlag`
This commit is contained in:
Dean Herbert 2024-03-09 20:48:54 +08:00 committed by GitHub
commit d74ae12321
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,11 +15,12 @@ namespace osu.Game.Users.Drawables
{
private readonly CountryCode countryCode;
public LocalisableString TooltipText => countryCode == CountryCode.Unknown ? string.Empty : countryCode.GetDescription();
public LocalisableString TooltipText { get; }
public DrawableFlag(CountryCode countryCode)
{
this.countryCode = countryCode;
TooltipText = countryCode == CountryCode.Unknown ? string.Empty : countryCode.GetDescription();
}
[BackgroundDependencyLoader]