mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Animated emoji improvements
This commit is contained in:
@@ -64,6 +64,8 @@ private final class StickerPreviewPeekContentNode: ASDisplayNode, PeekController
|
||||
|
||||
private var containerLayout: (ContainerViewLayout, CGFloat)?
|
||||
|
||||
private let _ready = Promise<Bool>()
|
||||
|
||||
init(account: Account, item: ImportStickerPack.Sticker) {
|
||||
self.account = account
|
||||
self.item = item
|
||||
@@ -104,6 +106,21 @@ private final class StickerPreviewPeekContentNode: ASDisplayNode, PeekController
|
||||
}
|
||||
|
||||
self.addSubnode(self.textNode)
|
||||
|
||||
if let animationNode = self.animationNode {
|
||||
animationNode.started = { [weak self] in
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
strongSelf._ready.set(.single(true))
|
||||
}
|
||||
} else {
|
||||
self._ready.set(.single(true))
|
||||
}
|
||||
}
|
||||
|
||||
func ready() -> Signal<Bool, NoError> {
|
||||
return self._ready.get()
|
||||
}
|
||||
|
||||
func updateLayout(size: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||
|
||||
Reference in New Issue
Block a user