Fix incorrect beatmap set info equality check on non-online set info

This commit is contained in:
iiSaLMaN 2019-10-15 23:40:48 +03:00
parent 8bba6288a8
commit 14c72f85fa
1 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,12 @@ public int? OnlineBeatmapSetID
public bool Protected { get; set; }
public bool Equals(BeatmapSetInfo other) => OnlineBeatmapSetID == other?.OnlineBeatmapSetID;
public bool Equals(BeatmapSetInfo other)
{
if (!OnlineBeatmapSetID.HasValue || !(other?.OnlineBeatmapSetID.HasValue ?? false))
return ReferenceEquals(this, other);
return OnlineBeatmapSetID == other.OnlineBeatmapSetID;
}
}
}