Voice Chats UI improvements

This commit is contained in:
Ilya Laktyushin
2020-11-21 13:19:30 +04:00
parent e87908a532
commit a362cab636
22 changed files with 6710 additions and 4725 deletions

View File

@@ -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)
}