Update existing usages of Author as string to access Username directly

This commit is contained in:
Dean Herbert
2021-11-04 18:22:21 +09:00
parent 7547810979
commit 86540d1fb6
14 changed files with 45 additions and 52 deletions

View File

@ -11,7 +11,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Localisation;
using osu.Framework.Platform;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Users;
namespace osu.Game.Graphics.Containers
{
@ -70,8 +70,8 @@ namespace osu.Game.Graphics.Containers
createLink(new TextPartManual(text), new LinkDetails(action, linkArgument), tooltipText);
}
public void AddUserLink(APIUser user, Action<SpriteText> creationParameters = null)
=> createLink(CreateChunkFor(user.Username, true, CreateSpriteText, creationParameters), new LinkDetails(LinkAction.OpenUserProfile, user.Id.ToString()), "view profile");
public void AddUserLink(IUser user, Action<SpriteText> creationParameters = null)
=> createLink(CreateChunkFor(user.Username, true, CreateSpriteText, creationParameters), new LinkDetails(LinkAction.OpenUserProfile, user.OnlineID.ToString()), "view profile");
private void createLink(ITextPart textPart, LinkDetails link, LocalisableString tooltipText, Action action = null)
{