diff --git a/osu.Game/Online/Chat/MessageFormatter.cs b/osu.Game/Online/Chat/MessageFormatter.cs index 3fdce3ec12..9966f78435 100644 --- a/osu.Game/Online/Chat/MessageFormatter.cs +++ b/osu.Game/Online/Chat/MessageFormatter.cs @@ -210,13 +210,13 @@ public static Message FormatMessage(Message inputMessage) return inputMessage; } - public static List GetLinks(string text) + public static MessageFormatterResult FormatText(string text) { var result = format(text); result.Links.Sort(); - return result.Links; + return result; } public class MessageFormatterResult diff --git a/osu.Game/Overlays/Profile/Sections/Recent/DrawableRecentActivity.cs b/osu.Game/Overlays/Profile/Sections/Recent/DrawableRecentActivity.cs index 6abf68e3e9..4d215467bb 100644 --- a/osu.Game/Overlays/Profile/Sections/Recent/DrawableRecentActivity.cs +++ b/osu.Game/Overlays/Profile/Sections/Recent/DrawableRecentActivity.cs @@ -34,8 +34,8 @@ public DrawableRecentActivity(RecentActivity activity, User user) this.activity = activity; this.user = user; - userLinkTemplate = $"[{activity.User?.Username}]({urlToAbsolute(activity.User?.Url)})"; - beatmapLinkTemplate = $"[{activity.Beatmap?.Title}]({urlToAbsolute(activity.Beatmap?.Url)})"; + userLinkTemplate = $"[{urlToAbsolute(activity.User?.Url)} {activity.User?.Username}]"; + beatmapLinkTemplate = $"[{urlToAbsolute(activity.Beatmap?.Url)} {activity.Beatmap?.Title}]"; } [BackgroundDependencyLoader] @@ -59,9 +59,9 @@ private void load(APIAccess api) Colour = OsuColour.Gray(0xAA), }); - string text = activityToString(); + var formatted = MessageFormatter.FormatText(activityToString()); - content.AddLinks(text, MessageFormatter.GetLinks(text)); + content.AddLinks(formatted.Text, formatted.Links); } protected override Drawable CreateLeftVisual() diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 39cb71ea27..f19fc4062c 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -75,6 +75,9 @@ protected override void PopOut() public void ShowUser(long userId) { + if (userId == Header.User.Id) + return; + ShowUser(new User { Id = userId }, true); }