Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
added labels equatable check to ListDiffable isEqual method, fixes #715
Browse files Browse the repository at this point in the history
… (#716)
  • Loading branch information
joerocca authored and rnystrom committed Oct 25, 2017
1 parent 9851a45 commit 282a846
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Classes/Models/RepositoryLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import IGListKit

final class RepositoryLabel: ListDiffable {
final class RepositoryLabel: ListDiffable, Equatable {

let color: String
let name: String
Expand All @@ -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
}

}
1 change: 1 addition & 0 deletions Classes/Repository/RepositoryIssueSummaryModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ class RepositoryIssueSummaryModel: ListDiffable {
&& author == object.author
&& created == object.created
&& title.attributedText.string == object.title.attributedText.string
&& labels == object.labels
}
}

0 comments on commit 282a846

Please sign in to comment.