mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -190,22 +190,13 @@ open class ManagedAnimationNode: ASDisplayNode {
|
||||
|
||||
self.addSubnode(self.imageNode)
|
||||
|
||||
var previousTimestamp = CACurrentMediaTime()
|
||||
displayLinkUpdate = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
// let timestamp = CACurrentMediaTime()
|
||||
// var delta: Double
|
||||
// if let previousTimestamp = strongSelf.previousTimestamp {
|
||||
// delta = min(timestamp - previousTimestamp, 1.0 / 60.0)
|
||||
// if let currentDelta = strongSelf.delta, currentDelta < delta {
|
||||
// delta = currentDelta
|
||||
// }
|
||||
// } else {
|
||||
let delta = 1.0 / 60.0
|
||||
// }
|
||||
// strongSelf.previousTimestamp = timestamp
|
||||
strongSelf.delta = delta
|
||||
|
||||
let currentTimestamp = CACurrentMediaTime()
|
||||
strongSelf.delta = currentTimestamp - previousTimestamp
|
||||
strongSelf.updateAnimation()
|
||||
previousTimestamp = currentTimestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user