mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-01 19:46:45 +08:00
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,5 +56,6 @@ class RepositoryIssueSummaryModel: ListDiffable {
|
||||
&& author == object.author
|
||||
&& created == object.created
|
||||
&& title.attributedText.string == object.title.attributedText.string
|
||||
&& labels == object.labels
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user