Skip to content
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

Fix -[ASPagerNode view] triggering pendingState + nodeLoaded assert #trivial #564

Merged
merged 1 commit into from
Sep 13, 2017

Conversation

samhsiung
Copy link
Contributor

@samhsiung samhsiung commented Sep 13, 2017

-[ASCollectionNode didLoad] transfers contentInset from the pendingState to the newly materialized ASCollectionView . However for ASPagerNode, this action triggers -[ASCollectionNode contentInset] which in turns calls -[ASCollectionNode pendingState] before the pendingState is cleared on the pager node, thereby prematurely triggering the assert:

  ASDisplayNodeAssert(![self isNodeLoaded] || !_pendingState, @"ASCollectionNode should not have a pendingState once it is loaded");

To fix this we clear out the pending state on the node before transferring the pendingState properties to the ASCollectionView

screen shot 2017-09-12 at 8 35 22 pm

screen shot 2017-09-12 at 8 23 27 pm

screen shot 2017-09-12 at 8 23 49 pm

@CLAassistant
Copy link

CLAassistant commented Sep 13, 2017

CLA assistant check
All committers have signed the CLA.

@ghost
Copy link

ghost commented Sep 13, 2017

1 Warning
⚠️ Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.

Generated by 🚫 Danger

@nguyenhuy nguyenhuy changed the title Fix -[ASPagerNode view] triggering pendingState + nodeLoaded assert Fix -[ASPagerNode view] triggering pendingState + nodeLoaded assert #trivial Sep 13, 2017
Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samhsiung Thanks for fixing this. Please sign the CLA and we're good to go!

@samhsiung
Copy link
Contributor Author

Thanks @nguyenhuy, signed!

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nguyenhuy nguyenhuy merged commit 008b847 into TextureGroup:master Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants