mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Fix long recent activity text overlapping timestamp.
- Also remove unnecessary fallback from absolute URL helper
This commit is contained in:
@ -19,19 +19,16 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
private APIAccess api;
|
private APIAccess api;
|
||||||
|
|
||||||
private readonly RecentActivity activity;
|
private readonly RecentActivity activity;
|
||||||
private readonly string userLinkTemplate;
|
|
||||||
private readonly string beatmapLinkTemplate;
|
private string userLinkTemplate;
|
||||||
private readonly string beatmapsetLinkTemplate;
|
private string beatmapLinkTemplate;
|
||||||
|
private string beatmapsetLinkTemplate;
|
||||||
|
|
||||||
private LinkFlowContainer content;
|
private LinkFlowContainer content;
|
||||||
|
|
||||||
public DrawableRecentActivity(RecentActivity activity)
|
public DrawableRecentActivity(RecentActivity activity)
|
||||||
{
|
{
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
|
|
||||||
userLinkTemplate = $"[{urlToAbsolute(activity.User?.Url)} {activity.User?.Username}]";
|
|
||||||
beatmapLinkTemplate = $"[{urlToAbsolute(activity.Beatmap?.Url)} {activity.Beatmap?.Title}]";
|
|
||||||
beatmapsetLinkTemplate = $"[{urlToAbsolute(activity.Beatmapset?.Url)} {activity.Beatmapset?.Title}]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -39,6 +36,12 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
{
|
{
|
||||||
this.api = api;
|
this.api = api;
|
||||||
|
|
||||||
|
userLinkTemplate = $"[{toAbsoluteUrl(activity.User?.Url)} {activity.User?.Username}]";
|
||||||
|
beatmapLinkTemplate = $"[{toAbsoluteUrl(activity.Beatmap?.Url)} {activity.Beatmap?.Title}]";
|
||||||
|
beatmapsetLinkTemplate = $"[{toAbsoluteUrl(activity.Beatmapset?.Url)} {activity.Beatmapset?.Title}]";
|
||||||
|
|
||||||
|
LeftFlowContainer.Padding = new MarginPadding { Left = 10, Right = 160 };
|
||||||
|
|
||||||
LeftFlowContainer.Add(content = new LinkFlowContainer
|
LeftFlowContainer.Add(content = new LinkFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
@ -90,7 +93,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string urlToAbsolute(string url) => $"{api?.Endpoint ?? @"https://osu.ppy.sh"}{url}";
|
private string toAbsoluteUrl(string url) => $"{api.Endpoint}{url}";
|
||||||
|
|
||||||
private string activityToString()
|
private string activityToString()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user