Commit graph

2 commits

Author SHA1 Message Date
dirtmelon
b948982674 Replace if let with guard let (#1466)
Summary:
## Changes in this pull request

### Checklist

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1466

Reviewed By: bdotdub

Differential Revision: D24235336

Pulled By: lorixx

fbshipit-source-id: bfc5fab26ae28ff9306d1b889b82b49c6ae2a636
2020-10-12 14:29:11 -07:00
Nate Stedman
5f3c7e0319 Add experimental Swift IGListKit APIs
Summary:
This diff introduces two experimental APIs to make `IGListKit` more usable with Swift values types:

- The `ListIdentifiable` protocol, which provides the equivalent of the diff identifier half of `ListDiffable`. For equality, we just use Swift's native `Equatable`.
- The `ListValueSectionController` base class, which provides a section controller interface for use with `ListIdentifiable` values.

These two APIs work together through the use of a private box class. I'd like to keep this detail hidden from callers, so that product code only deals with native Swift types.

Differential Revision: D23606413

fbshipit-source-id: 23718c508643f165c74550f1515d77448bd42d42
2020-09-22 08:00:06 -07:00