mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Animated emoji improvements
This commit is contained in:
parent
2a5b45883d
commit
c141531c7b
58 changed files with 3446 additions and 1133 deletions
|
|
@ -165,6 +165,7 @@ public protocol AnimatedStickerNode: ASDisplayNode {
|
|||
var autoplay: Bool { get set }
|
||||
|
||||
var visibility: Bool { get set }
|
||||
var overrideVisibility: Bool { get set }
|
||||
|
||||
var isPlayingChanged: (Bool) -> Void { get }
|
||||
|
||||
|
|
@ -222,6 +223,7 @@ public final class DefaultAnimatedStickerNodeImpl: ASDisplayNode, AnimatedSticke
|
|||
}
|
||||
|
||||
public var autoplay = false
|
||||
public var overrideVisibility: Bool = false
|
||||
|
||||
public var visibility = false {
|
||||
didSet {
|
||||
|
|
@ -386,7 +388,7 @@ public final class DefaultAnimatedStickerNodeImpl: ASDisplayNode, AnimatedSticke
|
|||
|
||||
private func updateIsPlaying() {
|
||||
if !self.autoplay {
|
||||
let isPlaying = self.visibility && self.isDisplaying
|
||||
let isPlaying = self.visibility && (self.isDisplaying || self.overrideVisibility)
|
||||
if self.isPlaying != isPlaying {
|
||||
self.isPlaying = isPlaying
|
||||
if isPlaying {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ public final class DirectAnimatedStickerNode: ASDisplayNode, AnimatedStickerNode
|
|||
}
|
||||
}
|
||||
|
||||
public var overrideVisibility: Bool = false
|
||||
|
||||
public var isPlayingChanged: (Bool) -> Void = { _ in }
|
||||
|
||||
private var sourceDisposable: Disposable?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue