mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 13:13:55 +00:00
Fix chat loading placeholder
This commit is contained in:
parent
060bc61011
commit
b4ffedcc3d
@ -209,7 +209,9 @@ final class ChatLoadingPlaceholderNode: ASDisplayNode {
|
||||
|
||||
if self.context.sharedContext.energyUsageSettings.fullTranslucency {
|
||||
Queue.mainQueue().after(0.3) {
|
||||
self.backgroundNode?.updateIsLooping(true)
|
||||
if !self.didAnimateOut {
|
||||
self.backgroundNode?.updateIsLooping(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -282,11 +284,12 @@ final class ChatLoadingPlaceholderNode: ASDisplayNode {
|
||||
self.borderMaskNode.bounds = self.borderMaskNode.bounds.offsetBy(dx: 0.0, dy: inset)
|
||||
}
|
||||
|
||||
private var didAnimateOut = false
|
||||
func animateOut(_ historyNode: ChatHistoryNode, completion: @escaping () -> Void = {}) {
|
||||
guard let listNode = historyNode as? ListView, let (size, _, _) = self.validLayout else {
|
||||
return
|
||||
}
|
||||
|
||||
self.didAnimateOut = true
|
||||
self.backgroundNode?.updateIsLooping(false)
|
||||
|
||||
let transition = ContainedViewLayoutTransition.animated(duration: 0.3, curve: .spring)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user