mirror of
https://github.com/ppy/osu
synced 2025-01-24 23:03:14 +00:00
Use clock to obtain a position for comment insertion
This commit is contained in:
parent
c2bb0949f5
commit
c36922dd2c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user