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

[ASTableView] Generate a new cell layout if existing ones are invalid #942

Merged
merged 6 commits into from
May 28, 2018

Conversation

nguyenhuy
Copy link
Member

No description provided.

@ghost
Copy link

ghost commented May 25, 2018

🚫 CI failed with log

ASCellNode *node = element.node;
if (element != nil && node != nil) {
height = [node layoutThatFits:element.constrainedSize].size.height;
}
Copy link
Contributor

@maicki maicki May 25, 2018

Choose a reason for hiding this comment

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

Do we not need the else case and use the cached size: node.calculatedSize.height;

Copy link
Member Author

Choose a reason for hiding this comment

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

No we don't. -layoutThatFits: checks and uses the cached size if possible.

ASCellNode *node = element.node;
if (element != nil && node != nil) {
height = [node layoutThatFits:element.constrainedSize].size.height;
}
Copy link
Member

Choose a reason for hiding this comment

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

Should we assert that node exists?

@nguyenhuy nguyenhuy changed the title [ASTableView] During row height query, a new layout should be generated if existing ones are invalid [ASTableView] Generate a new layout if existing ones are invalid May 25, 2018
Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

👍

@ghost
Copy link

ghost commented May 25, 2018

🚫 CI failed with log

@nguyenhuy nguyenhuy changed the title [ASTableView] Generate a new layout if existing ones are invalid [ASTableView] Generate a new cell layout if existing ones are invalid May 25, 2018
@nguyenhuy nguyenhuy merged commit 8a4bb6c into TextureGroup:master May 28, 2018
@nguyenhuy nguyenhuy deleted the HNTableViewHeightQuery branch May 28, 2018 15:43
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.

3 participants