mirror of
https://github.com/osukey/osukey.git
synced 2025-06-22 19:57:56 +09:00
Make User IEquatable
This commit is contained in:
parent
7c0e823b95
commit
ffa8a50c6b
@ -9,7 +9,7 @@ using osu.Framework.Bindables;
|
|||||||
|
|
||||||
namespace osu.Game.Users
|
namespace osu.Game.Users
|
||||||
{
|
{
|
||||||
public class User
|
public class User : IEquatable<User>
|
||||||
{
|
{
|
||||||
[JsonProperty(@"id")]
|
[JsonProperty(@"id")]
|
||||||
public long Id = 1;
|
public long Id = 1;
|
||||||
@ -244,5 +244,13 @@ namespace osu.Game.Users
|
|||||||
[Description("Touch Screen")]
|
[Description("Touch Screen")]
|
||||||
Touch,
|
Touch,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Equals(User other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other)) return false;
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
|
||||||
|
return Id == other.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user