added labels equatable check to ListDiffable isEqual method, fixes #715 (#716)

This commit is contained in:
Joe Rocca
2017-10-24 21:46:31 -04:00
committed by Ryan Nystrom
parent 9851a45cd6
commit 282a84683b
2 changed files with 9 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
import Foundation
import IGListKit
final class RepositoryLabel: ListDiffable {
final class RepositoryLabel: ListDiffable, Equatable {
let color: String
let name: String
@@ -30,5 +30,12 @@ final class RepositoryLabel: ListDiffable {
guard let object = object as? RepositoryLabel else { return false }
return color == object.color
}
//MARK: Equatable
static func ==(lhs: RepositoryLabel, rhs: RepositoryLabel) -> Bool {
return lhs.name == rhs.name
&& lhs.color == rhs.color
}
}

View File

@@ -56,5 +56,6 @@ class RepositoryIssueSummaryModel: ListDiffable {
&& author == object.author
&& created == object.created
&& title.attributedText.string == object.title.attributedText.string
&& labels == object.labels
}
}