Use bindables the whole way

This commit is contained in:
Dean Herbert
2019-05-21 13:34:35 +09:00
parent 58a3480b6a
commit a131875a7b
4 changed files with 65 additions and 70 deletions

View File

@ -7,7 +7,7 @@ using System.Collections.Generic;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIChangelogBuild
public class APIChangelogBuild : IEquatable<APIChangelogBuild>
{
[JsonProperty("id")]
public long Id { get; set; }
@ -42,6 +42,8 @@ namespace osu.Game.Online.API.Requests.Responses
public APIChangelogBuild Previous { get; set; }
}
public bool Equals(APIChangelogBuild other) => this.Id == other?.Id;
public override string ToString() => $"{UpdateStream.DisplayName} {DisplayVersion}";
}
}

View File

@ -25,13 +25,7 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("latest_build")]
public APIChangelogBuild LatestBuild { get; set; }
public bool Equals(APIUpdateStream other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Id == other.Id;
}
public bool Equals(APIUpdateStream other) => this.Id == other?.Id;
public ColourInfo Colour
{