-
Notifications
You must be signed in to change notification settings - Fork 60
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
implement update modified items #11
Conversation
Have you done any testing with mixed updates, i.e. inserted, deleted, moved and modified rows together? I have had trouble with this, which is why it was a todo item. If you look at
|
Thanks for pointing that out. I haven't test it throughly, but I do have use cases with mixed insert/delete/update. If I do the same thing for collection view, updating modified rows in completionBlock, will it work? |
Can you give me a use case that will cause the crash. I tried with mixed updates, seems working fine. tested on iPad simulator, ios7 |
if (self.modifiedItems.count) { | ||
NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; | ||
for (id item in self.modifiedItems) { | ||
NSIndexPath *indexPath = [self.oldDataModel indexPathForItem:item]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be?
NSIndexPath *indexPath = [self.updatedDataModel indexPathForItem:item];`
Maybe it works on iOS7. I haven't looked at it since iOS6. I don't remember a specific use case, but I'll do some testing after the holidays. |
cool, thanks! happy holiday. |
…saction Extract modified items transaction from the main transaction
I've added updating modified rows in completion block. |
Regarding occasional crashes, are you referring to my latest update or this pull request? If you mean the pull request, I would suggest you try wrapping both batch updates in a single |
I am referring to the pull request. Will try your suggestion. Thanks. |
I think this can be closed now. Please reopen if you continue to have problems. |
No description provided.