Use clock to obtain a position for comment insertion

This commit is contained in:
ansel 2023-01-14 22:57:51 +03:00
parent c2bb0949f5
commit c36922dd2c

View File

@ -344,15 +344,7 @@ namespace osu.Game.Overlays.Comments
foreach (var comment in loaded)
{
int pos = -1;
if (content.Count > 0)
{
var first = content.FlowingChildren.First();
pos = (int)(content.GetLayoutPosition(first) - 1);
}
content.Insert(pos, comment);
content.Insert((int)-Clock.CurrentTime, comment);
}
}, (loadCancellation = new CancellationTokenSource()).Token);
}