mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-10 13:06:33 +00:00
[ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated.
This commit is contained in:
@@ -151,7 +151,7 @@ static NSString * const kStatus = @"status";
|
||||
self.player = [AVPlayer playerWithPlayerItem:playerItem];
|
||||
}
|
||||
|
||||
if (self.image == nil) {
|
||||
if (self.image == nil && self.URL == nil) {
|
||||
[self generatePlaceholderImage];
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ static NSString * const kStatus = @"status";
|
||||
if ([change[NSKeyValueChangeNewKey] integerValue] == AVPlayerItemStatusReadyToPlay) {
|
||||
self.playerState = ASVideoNodePlayerStateReadyToPlay;
|
||||
// If we don't yet have a placeholder image update it now that we should have data available for it
|
||||
if (self.image == nil) {
|
||||
if (self.image == nil && self.URL == nil) {
|
||||
[self generatePlaceholderImage];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user