Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

IndexPath.section is always zero in the results #4

Closed
richardtop opened this issue Jan 15, 2018 · 5 comments
Closed

IndexPath.section is always zero in the results #4

richardtop opened this issue Jan 15, 2018 · 5 comments

Comments

@richardtop
Copy link

While this issue is related to #1 , what I propose is to make DeepDiff applicable to calculate Diff in any section other than 0.
Currently, the section number is hardcoded to be 0.

What I propose, is to add a section parameter to the API to generate valid IndexPaths, for example:

let changes = diff(old: oldItems, new: items, section: 4)
@onmyway133
Copy link
Owner

@richardtop This makes sense. I will implement as you suggest 👍

@onmyway133
Copy link
Owner

@richardtop Hi, I just made the changes, you can check https://github.com/onmyway133/DeepDiff/releases/tag/1.1.1

@onmyway133
Copy link
Owner

@richardtop I think I will close this. Feel free to reopen it if you face any issues

@richardtop
Copy link
Author

richardtop commented Jan 30, 2018

@onmyway133 didn't have a time to actually use these functions.
I've used this library to prototype a reconciliation algorithm similar to react in iOS, backed by UICollectionView.

@onmyway133
Copy link
Owner

@richardtop Hi, I built this DeepDiff for this https://github.com/hyperoslo/Upstream. Essentially I want UI to be driven by Model. In the future I would like to build something like Messengers UI or Forms based on Upstream, for every kinds of actions (input, text, selection) will trigger changes to model, hence reinvalidating all the cells

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants