Fix comment edited at date not showing tooltip

This commit is contained in:
Joehu 2021-02-15 18:38:54 -08:00
parent 335af04764
commit e838a5d9f0
1 changed files with 25 additions and 5 deletions

View File

@ -9,7 +9,6 @@
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Users.Drawables;
using osu.Game.Graphics.Containers;
using osu.Game.Utils;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Bindables;
using System.Linq;
@ -245,11 +244,32 @@ private void load(OverlayColourProvider colourProvider)
if (Comment.EditedAt.HasValue)
{
info.Add(new OsuSpriteText
var font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular);
var colour = colourProvider.Foreground1;
info.Add(new FillFlowContainer
{
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
Text = $@"edited {HumanizerUtils.Humanize(Comment.EditedAt.Value)} by {Comment.EditedUser.Username}",
Colour = colourProvider.Foreground1
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new OsuSpriteText
{
Font = font,
Text = "edited ",
Colour = colour
},
new DrawableDate(Comment.EditedAt.Value)
{
Font = font,
Colour = colour
},
new OsuSpriteText
{
Font = font,
Text = $@" by {Comment.EditedUser.Username}",
Colour = colour
},
}
});
}