This commit is contained in:
Ilya Laktyushin 2023-06-22 01:41:45 +04:00
parent c67d05c386
commit 270f72dac0

View File

@ -3667,17 +3667,6 @@ final class PrivacyButtonComponent: CombinedComponent {
context.add(text
.position(CGPoint(x: backgroundSize.width / 2.0 + 7.0, y: backgroundSize.height / 2.0))
.update(Transition.Update { _, view, _ in
if let snapshot = view.snapshotView(afterScreenUpdates: false) {
let transition = Transition(animation: .curve(duration: 0.2, curve: .easeInOut))
view.superview?.addSubview(snapshot)
transition.setAlpha(view: snapshot, alpha: 0.0, completion: { [weak snapshot] _ in
snapshot?.removeFromSuperview()
})
snapshot.frame = view.frame
transition.animateAlpha(view: view, from: 0.0, to: 1.0)
}
})
)
return backgroundSize