Update various usages of Country inline with new enum

This commit is contained in:
Salman Ahmed
2022-07-16 04:40:37 +03:00
parent b2b2a4adaf
commit e62049f4a9
19 changed files with 74 additions and 177 deletions

View File

@ -5,6 +5,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
@ -174,8 +175,8 @@ namespace osu.Game.Overlays.Profile.Header
avatar.User = user;
usernameText.Text = user?.Username ?? string.Empty;
openUserExternally.Link = $@"{api.WebsiteRootUrl}/users/{user?.Id ?? 0}";
userFlag.Country = user?.Country;
userCountryText.Text = user?.Country?.FullName ?? "Alien";
userFlag.Country = user?.Country ?? default;
userCountryText.Text = (user?.Country ?? default).GetDescription();
supporterTag.SupportLevel = user?.SupportLevel ?? 0;
titleText.Text = user?.Title ?? string.Empty;
titleText.Colour = Color4Extensions.FromHex(user?.Colour ?? "fff");