mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 05:26:48 +00:00
Fix background progress
This commit is contained in:
parent
e5af882afe
commit
ae3d0be81f
@ -661,6 +661,7 @@ public final class MessageInlineBlockBackgroundView: UIView {
|
|||||||
} else {
|
} else {
|
||||||
progressBackgroundContentsView = UIImageView()
|
progressBackgroundContentsView = UIImageView()
|
||||||
progressBackgroundContentsView.image = generateProgressTemplateImage()
|
progressBackgroundContentsView.image = generateProgressTemplateImage()
|
||||||
|
self.progressBackgroundContentsView = progressBackgroundContentsView
|
||||||
self.insertSubview(progressBackgroundContentsView, aboveSubview: self.backgroundView)
|
self.insertSubview(progressBackgroundContentsView, aboveSubview: self.backgroundView)
|
||||||
progressBackgroundContentsView.tintColor = primaryColor
|
progressBackgroundContentsView.tintColor = primaryColor
|
||||||
}
|
}
|
||||||
@ -700,7 +701,9 @@ public final class MessageInlineBlockBackgroundView: UIView {
|
|||||||
if let progressBackgroundContentsView = self.progressBackgroundContentsView {
|
if let progressBackgroundContentsView = self.progressBackgroundContentsView {
|
||||||
self.progressBackgroundContentsView = nil
|
self.progressBackgroundContentsView = nil
|
||||||
let transition = ContainedViewLayoutTransition.animated(duration: 0.15, curve: .easeInOut)
|
let transition = ContainedViewLayoutTransition.animated(duration: 0.15, curve: .easeInOut)
|
||||||
transition.updateAlpha(layer: progressBackgroundContentsView.layer, alpha: 0.0)
|
transition.updateAlpha(layer: progressBackgroundContentsView.layer, alpha: 0.0, completion: { [weak progressBackgroundContentsView] _ in
|
||||||
|
progressBackgroundContentsView?.removeFromSuperview()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
self.progressBackgroundMaskContainer = nil
|
self.progressBackgroundMaskContainer = nil
|
||||||
self.progressBackgroundGradientView = nil
|
self.progressBackgroundGradientView = nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user