Instagram / Instagram/IGListKit

ModelingAndBinding example confusion

Open
#1,286 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Objective-C
Stars
13.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I was going over how to use the ListBindingSectionController API with @rnystrom's ModelingAndBinding example and I was confused as to how IGListKit performed diffs and was hoping I could receive some clarification.

Attached is a screenshot of an iPhone XR running his example where I added a navigation button item that performs the action ```performDiffs()```. I make a new post with a new like count, keeping everything the same. I append the new post to the data source but no update is triggered.

My understanding was that you have a list of Diffable items in a mutable container and once your database/whatever retrieves some new information, you add to that list of items and use ```adapter.performUpdates()``` which will take the from objects and the to objects and compare them. In my case, I thought it would find the difference in the like count and perform the necessary update.

Am I misunderstanding something? Thanks again for the framework.

screen shot 2018-11-29 at 9 54 24 am

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.