-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Uniqueness assert of section controllers, close #567 #639
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
Conversation
Generated by 🚫 Danger |
jessesquires
left a comment
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.
Thanks @heshamsalman ! 🙌
Looks good to me! 💯 Just one comment.
Source/IGListAdapter.m
Outdated
|
|
||
| #if DEBUG | ||
| NSSet *sectionSet = [NSSet setWithArray:sectionControllers]; | ||
| IGAssert(sectionSet.count == sectionControllers.count, @"Section controllers array is not filled with unique objects; section controllers are being reused"); |
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.
we can remove the #if DEBUG and simply alloc the set inside the assert:
IGAssert([NSSet setWithArray:sectionControllers].count == sectionControllers.count,
@"......");|
@heshamsalman updated the pull request - view changes |
|
@heshamsalman updated the pull request - view changes |
jessesquires
left a comment
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.
thanks @heshamsalman ! 🥇
|
@jessesquires has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Changes in this pull request
Issue fixed: #567
Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes.