mirror of
https://github.com/ppy/osu.git
synced 2025-02-07 21:33:16 +08:00
Fix edge case where minutes are same but hour is different
This commit is contained in:
parent
7229ae83ea
commit
25747fdeb3
@ -88,15 +88,17 @@ namespace osu.Game.Overlays.Chat
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
int? minute = null;
|
int? lastMinutes = null;
|
||||||
|
|
||||||
for (int i = 0; i < ChatLineFlow.Count; i++)
|
for (int i = 0; i < ChatLineFlow.Count; i++)
|
||||||
{
|
{
|
||||||
if (ChatLineFlow[i] is ChatLine chatline)
|
if (ChatLineFlow[i] is ChatLine chatline)
|
||||||
{
|
{
|
||||||
|
int minutes = chatline.Message.Timestamp.TotalOffsetMinutes;
|
||||||
|
|
||||||
chatline.AlternatingBackground = i % 2 == 0;
|
chatline.AlternatingBackground = i % 2 == 0;
|
||||||
chatline.RequiresTimestamp = chatline.Message.Timestamp.Minute != minute;
|
chatline.RequiresTimestamp = minutes != lastMinutes;
|
||||||
minute = chatline.Message.Timestamp.Minute;
|
lastMinutes = minutes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user