-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
IGListBindingSectionController updateAnimated have copy BUG #999
Comments
Thanks for investigating @YasinZhou! We deduplicate the models returned from the data source, so even if a mutable array is returned, it should be totally safe. You made me double check everything though, and I did come across this, and you're right that if the data source returns an That'd be a really easy and useful fix if you want to submit a PR! |
Good bug, but not world-ending. Leaving as a great starter task for someone! |
@rnystrom I decided to take care of this. However, I'm not sure if this is something we need to write a test for. I don't think we need to write one for this change. Any thoughts on this? |
IGListBindingSectionController.m
and late
if
self.viewModels
is a NSMutableArray and just removeAllObjects and change the all value,result = IGListDiff(oldViewModels, self.viewModels, IGListDiffEquality);
is NOT rightso i think , oldViewModels need copy the self.viewModels([self.viewModels copy]) or self.viewModels's property replaces strong with copy.
and i think another
updateAnimated
have same BUG maybeThe text was updated successfully, but these errors were encountered: