mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Use clock to obtain a position for comment insertion
This commit is contained in:
@ -344,15 +344,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
|
|
||||||
foreach (var comment in loaded)
|
foreach (var comment in loaded)
|
||||||
{
|
{
|
||||||
int pos = -1;
|
content.Insert((int)-Clock.CurrentTime, comment);
|
||||||
|
|
||||||
if (content.Count > 0)
|
|
||||||
{
|
|
||||||
var first = content.FlowingChildren.First();
|
|
||||||
pos = (int)(content.GetLayoutPosition(first) - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
content.Insert(pos, comment);
|
|
||||||
}
|
}
|
||||||
}, (loadCancellation = new CancellationTokenSource()).Token);
|
}, (loadCancellation = new CancellationTokenSource()).Token);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user