mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00
Video Chat Improvements
This commit is contained in:
parent
4424e7b8da
commit
2e71f2f0df
@ -69,18 +69,15 @@ private class VoiceChatPinButtonNode: HighlightTrackingButtonNode {
|
||||
self.pinButtonIconNode.update(state: .init(pinned: pinned, color: .white), animated: true)
|
||||
self.isPinned = pinned
|
||||
|
||||
self.pinButtonTitleNode.alpha = self.isPinned ? 1.0 : 0.0
|
||||
if animated {
|
||||
if wasPinned {
|
||||
self.pinButtonTitleNode.alpha = 0.0
|
||||
self.pinButtonTitleNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2)
|
||||
self.pinButtonTitleNode.layer.animatePosition(from: CGPoint(), to: CGPoint(x: self.pinButtonTitleNode.frame.width, y: 0.0), duration: 0.2, additive: true)
|
||||
} else {
|
||||
self.pinButtonTitleNode.alpha = 1.0
|
||||
self.pinButtonTitleNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||
self.pinButtonTitleNode.layer.animatePosition(from: CGPoint(x: self.pinButtonTitleNode.frame.width, y: 0.0), to: CGPoint(), duration: 0.2, additive: true)
|
||||
}
|
||||
} else {
|
||||
self.pinButtonTitleNode.alpha = isPinned ? 1.0 : 0.0
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user