Commit graph

8 commits

Author SHA1 Message Date
Nate Stedman
1a44045dce Run lint on IGListKit
Differential Revision: D19141253

fbshipit-source-id: 9ed4c278a91bb48a1f6d33cafa9ce8f21861573d
2019-12-19 09:34:42 -08:00
Nate Stedman
9135cabe28 Use IGListAssert, not IGAssert
Reviewed By: lorixx

Differential Revision: D19141254

fbshipit-source-id: a93ae649be4d2430bf28208391ad027e02cdea3e
2019-12-17 13:07:17 -08:00
Zhisheng Huang
d7a6fc0847 Add a flag to control how the IGSectionObject's isEqualToDiffable: is implemented
Summary:
In the Feed view, all the -isEqualToDiffable: implementation only checks the pk, a.k.a the identifier.

Let's mimic that behavior.

Reviewed By: calimarkus

Differential Revision: D18714064

fbshipit-source-id: e1fe9624da2997ecc7ca9b684ddd471d77b7564c
2019-12-04 15:32:04 -08:00
Ryan Nystrom
8d8a632b67 Update MIT license language (#1272)
Summary:
Updating license language to meet FB open source standards.
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1272

Differential Revision: D12844366

Pulled By: rnystrom

fbshipit-source-id: 27ae49ae00d963c5c012c79c5738365c232a5773
2018-11-01 10:58:46 -07:00
Zhisheng Huang
f699ea0e17 Add option to update cells instead of delete+insert for section reload
Summary:
We have seen unnecessary flashiness updates for any section reload updates.

Basically we have 1 section for 1 cell, which is recommended by the IGListKit document in https://instagram.github.io/IGListKit/best-practices-and-faq.html, specifically:

> "We highly recommend using single-item sections when possible."

However, the issue is that whenever we update the underlying data model, we would trigger a delete+insert for the section reload.

In order to mitigate that, we can fix this delete+insert changes or we use the `IGListBindingSectionController`, however, the latter one requires more refactoring plus view model wrapper to have `isEqualToDifferable:` to return YES, which seems less than ideal.

I am proposing that we add an option to the `IGListAdapterUpdater`, as `preferItemReloadsForSectionReloads` so that when it's set to YES, we would trigger the proper `-[UICollectionView reloadItemsAtIndexPaths:]` which handles the cell update properly.

This option also handles the case where the number of items in the section is changed before and after the updates, in that case, it will fallback to do the "delete+insert" section operation.

Reviewed By: rnystrom

Differential Revision: D9519519

fbshipit-source-id: 22ecca07679ebdd212cf771c61e40887cb6a9ba8
2018-08-28 23:32:43 -07:00
Jesse Squires
0c0b31ad7c Run setup script with CocoaPods 1.5.3 (#1216)
Summary:
- Run setup script with CP 1.5.3
- Update to Xcode9.4 recommended settings
- Fix Xcode warnings about NSUInteger

This way we can avoid these changes on other open PRs/diffs.
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1216

Differential Revision: D8990061

Pulled By: rnystrom

fbshipit-source-id: ae15a267d7e6f19f71203ac4cd7d80ee966ee48b
2018-07-25 06:47:35 -07:00
Ryan Nystrom
ab890fc607 Change equality API to avoid NSObject override
Summary:
Changing the API to avoid overiding `-[NSObject isEqual:]` because of the side effects it brings (e.g. `-hash`). Not to mention the problems with Swift 2.3.

Fixes #65.

Reviewed By: jessesquires

Differential Revision: D4138570

fbshipit-source-id: 804af6c468c4c273adb73377e9bfda22515121d1
2016-11-10 16:59:02 -08:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00