mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge pull request #180 from facebook/issue-179
Only create a placeholder with a valid size
This commit is contained in:
@@ -377,7 +377,7 @@ void ASDisplayNodePerformBlockOnMainThread(void (^block)())
|
||||
|
||||
// we generate placeholders at measure: time so that a node is guaranteed to have a placeholder ready to go
|
||||
// also if a node has no size, it should not have a placeholder
|
||||
if (self.placeholderEnabled && [self displaysAsynchronously] && !CGSizeEqualToSize(_size, CGSizeZero)) {
|
||||
if (self.placeholderEnabled && [self displaysAsynchronously] && _size.width > 0.0 && _size.height > 0.0) {
|
||||
if (!_placeholderImage) {
|
||||
_placeholderImage = [self placeholderImage];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user