Skip to content

Commit

Permalink
Fix crash in Examples-iOS app when tapping "Mixed Data"
Browse files Browse the repository at this point in the history
Summary:
Fix crash in Examples-iOS app when tapping "Mixed Data"

Make GridItem conform to IGListDiffable now that NSObject+IGListDiffable category has been removed.

- [x] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes #251

Differential Revision: D4224337

Pulled By: jessesquires

fbshipit-source-id: 16a437c4e5e45185481b4262ea7770f4a8559618
  • Loading branch information
DRosadoYew authored and Facebook Github Bot committed Nov 23, 2016
1 parent e1d5104 commit 90cf9d5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ class GridItem: NSObject {

}

extension GridItem: IGListDiffable {

func diffIdentifier() -> NSObjectProtocol {
return self
}

func isEqual(toDiffableObject object: IGListDiffable?) -> Bool {
return self === object ? true : self.isEqual(object)
}

}

final class GridSectionController: IGListSectionController, IGListSectionType {

var object: GridItem?
Expand Down

0 comments on commit 90cf9d5

Please sign in to comment.