mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Voice Chats UI improvements
This commit is contained in:
@@ -20,9 +20,7 @@ final class ChatAvatarNavigationNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var tapped: (() -> Void)?
|
||||
|
||||
|
||||
override init() {
|
||||
self.containerNode = ContextControllerSourceNode()
|
||||
self.avatarNode = AvatarNode(font: normalFont)
|
||||
@@ -41,9 +39,6 @@ final class ChatAvatarNavigationNode: ASDisplayNode {
|
||||
|
||||
self.containerNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: 37.0, height: 37.0)).offsetBy(dx: 10.0, dy: 1.0)
|
||||
self.avatarNode.frame = self.containerNode.bounds
|
||||
|
||||
/*self.containerNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: 37.0, height: 37.0))
|
||||
self.avatarNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: 37.0, height: 37.0))*/
|
||||
}
|
||||
|
||||
override func didLoad() {
|
||||
@@ -51,19 +46,6 @@ final class ChatAvatarNavigationNode: ASDisplayNode {
|
||||
self.view.isOpaque = false
|
||||
}
|
||||
|
||||
@objc private func avatarTapGesture(_ recognizer: TapLongTapOrDoubleTapGestureRecognizer) {
|
||||
if case .ended = recognizer.state {
|
||||
if let (gesture, location) = recognizer.lastRecognizedGestureAndLocation {
|
||||
switch gesture {
|
||||
case .tap:
|
||||
self.tapped?()
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
return CGSize(width: 37.0, height: 37.0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user