New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSFetchedResultsChangeUpdate not counted #19
Conversation
I have experienced this issued too when i modified core data object and On Thu, Mar 13, 2014 at 6:53 AM, mmj notifications@github.com wrote:
|
TLIndexPathTools works by comparing two data models. Therefore, it can't detect modifications if the same instance exists in both data models. I am considering new APIs that would solve this, but what I want to do is too big to build unless my job needs it. I will try to think of a simple workaround. Suggestions welcome. |
I currently tested simple workaround. I stored all items which updated in NSFetchedResultsChangeUpdate in array . Right after creating TLIndexPathUpdates i am adding those items to modifiedItems if they are not presented there already. Since modifiedItems is readonly i created new method for that. Actually doesn't look like very beautiful solution, but it works. |
Excellent. I was thinking of something similar. Can you submit a pull request if you get it working? Thanks! Tim
|
When using TLIndexPathController with Core Data, updated managed objects were not being detected because the old and updated data models provided to TLIndexPathUpdates contained the same instance. With this fix, TLIndexPathController listens to the updated item notifications coming from the internal NSFetchedResultsController and passes the list of updated items to TLIndexPathUpdates.
I finally promoted a fix for this issue. Sorry for the delay. |
When using TLIndexPathController with NSFetchRequest, TLIndexPathUpdates internally not looking for NSFetchedResultsChangeUpdate and therefore simple item updates do not update corresponding cells.