mirror of
https://github.com/ppy/osu
synced 2025-01-01 20:02:14 +00:00
Change message comparator to always use timestamp comparison if either message has a missing Id
This commit is contained in:
parent
9e34fe360a
commit
2d8854cbac
@ -66,12 +66,10 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
public int CompareTo(Message other)
|
||||
{
|
||||
if (!Id.HasValue)
|
||||
return other.Id.HasValue ? 1 : Timestamp.CompareTo(other.Timestamp);
|
||||
if (!other.Id.HasValue)
|
||||
return -1;
|
||||
if (Id.HasValue && other.Id.HasValue)
|
||||
return Id.Value.CompareTo(other.Id.Value);
|
||||
|
||||
return Id.Value.CompareTo(other.Id.Value);
|
||||
return Timestamp.CompareTo(other.Timestamp);
|
||||
}
|
||||
|
||||
public virtual bool Equals(Message other)
|
||||
|
Loading…
Reference in New Issue
Block a user