mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Change message comparator to always use timestamp comparison if either message has a missing Id
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user