mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Remove assertion in calculateSizeThatFits: and add a log event (#299)
This commit is contained in:
committed by
GitHub
parent
a6c3517cf6
commit
8a9c6e8145
@@ -1049,11 +1049,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
{
|
||||
__ASDisplayNodeCheckForLayoutMethodOverrides;
|
||||
|
||||
#if ASDISPLAYNODE_ASSERTIONS_ENABLED
|
||||
if (ASIsCGSizeValidForSize(constrainedSize) == NO) {
|
||||
NSLog(@"Cannot calculate size of node: constrainedSize is infinite and node does not override -calculateSizeThatFits: or specify a preferredSize. Try setting style.preferredSize. Node: %@", [self displayNodeRecursiveDescription]);
|
||||
}
|
||||
#endif
|
||||
ASDisplayNodeLogEvent(self, @"calculateSizeThatFits: with constrainedSize: %@", NSStringFromCGSize(constrainedSize));
|
||||
|
||||
return ASIsCGSizeValidForSize(constrainedSize) ? constrainedSize : CGSizeZero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user