-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ASTableView] Generate a new cell layout if existing ones are invalid #942
Conversation
…t if the existing ones are invalid
🚫 CI failed with log |
Source/ASTableView.mm
Outdated
ASCellNode *node = element.node; | ||
if (element != nil && node != nil) { | ||
height = [node layoutThatFits:element.constrainedSize].size.height; | ||
} |
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.
Do we not need the else case and use the cached size: node.calculatedSize.height;
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.
No we don't. -layoutThatFits:
checks and uses the cached size if possible.
Source/ASTableView.mm
Outdated
ASCellNode *node = element.node; | ||
if (element != nil && node != nil) { | ||
height = [node layoutThatFits:element.constrainedSize].size.height; | ||
} |
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.
Should we assert that node exists?
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.
👍
🚫 CI failed with log |
No description provided.