IGListKit icon indicating copy to clipboard operation
IGListKit copied to clipboard

Method to Get Old Index Path for New Index Path in Update

Open Adlai-Holler opened this issue 8 years ago • 7 comments

In https://github.com/TextureGroup/Texture we're looking to support using NodeControllers for each item, and having the NodeController survive across object updates (reloadItemsAtIndexPaths:) just like IGListSectionControllers do.

Since IGListKit submits reloads as delete/insert pairs, I can't see any public way for us to find out whether, in a given batch update, an insert corresponds to a delete – if an item was updated.

@rnystrom @jessesquires Would you be willing to support that or point me in the right direction?

Adlai-Holler avatar Apr 18 '17 22:04 Adlai-Holler

Is this the same as #546?

jessesquires avatar Apr 19 '17 01:04 jessesquires

It's like that issue, except for reloads rather than moves.

Adlai-Holler avatar Apr 19 '17 01:04 Adlai-Holler

We could probably look into adding that after #657 lands. This is similar to #297 as well.

We can do this pretty easily w/out bothering to support UICollectionViewLayout (specifically UICollectionUpdateActionReload). We can add our new batch update reload pairs onto IGListBatchUpdateData.

@Adlai-Holler what sort of support are you thinking?

rnystrom avatar Apr 19 '17 02:04 rnystrom

Currently seems additive, so marking this for 3.1

jessesquires avatar Apr 19 '17 17:04 jessesquires

Bumped this to new 3.5.0 milestone since 3.4.0 was released already.

jessesquires avatar Jul 09 '18 17:07 jessesquires

Nevermind, bumped to 4.0 since that's the next release. 😄

jessesquires avatar Jul 09 '18 18:07 jessesquires

Bumping this to 4.1.0 since we don't have a need for this at Instagram right now. We would be happy to review and accept a PR if anyone wants to take this on.

iperry90 avatar Nov 15 '19 17:11 iperry90