Change message comparator to always use timestamp comparison if either message has a missing Id

This commit is contained in:
Dean Herbert 2022-11-30 15:46:58 +09:00
parent 9e34fe360a
commit 2d8854cbac

View File

@ -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)