Fix animated sticker seek when adding to a photo

This commit is contained in:
Ilya Laktyushin
2020-07-31 16:34:49 +03:00
parent 4aad869532
commit c00f6915de

View File

@@ -1223,10 +1223,12 @@ const CGFloat TGPhotoPaintStickerKeyboardSize = 260.0f;
NSTimeInterval currentTime = editorController.currentTime; NSTimeInterval currentTime = editorController.currentTime;
__strong TGPhotoStickerEntityView *strongStickerView = weakStickerView; __strong TGPhotoStickerEntityView *strongStickerView = weakStickerView;
if (strongStickerView != nil) { if (strongStickerView != nil) {
if (!isnan(currentTime)) {
[strongStickerView seekTo:currentTime]; [strongStickerView seekTo:currentTime];
[strongStickerView play]; [strongStickerView play];
} }
} }
}
}; };
[self selectEntityView:stickerView]; [self selectEntityView:stickerView];