@@ -482,6 +482,19 @@ final class VideoChatScreenComponent: Component {
482482 return result
483483 }
484484
485+ override func gestureRecognizerShouldBegin( _ gestureRecognizer: UIGestureRecognizer ) -> Bool {
486+ if let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer {
487+ let location = gestureRecognizer. location ( in: self )
488+ if let inputPanelView = self . inputPanel. view {
489+ let mappedLocation = self . convert ( location, to: inputPanelView)
490+ if inputPanelView. bounds. contains ( mappedLocation) {
491+ return false
492+ }
493+ }
494+ }
495+ return true
496+ }
497+
485498 @objc func gestureRecognizer( _ gestureRecognizer: UIGestureRecognizer , shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer ) -> Bool {
486499 if gestureRecognizer is UITapGestureRecognizer {
487500 if otherGestureRecognizer is UIPanGestureRecognizer {
@@ -751,7 +764,7 @@ final class VideoChatScreenComponent: Component {
751764 switch result {
752765 case . linkCopied:
753766 let presentationData = groupCall. accountContext. sharedContext. currentPresentationData. with { $0 }
754- self . presentToast ( icon: . icon ( " anim_linkcopied " ) , text: presentationData. strings. CallList_ToastCallLinkCopied_Text, duration: 3 )
767+ self . presentToast ( icon: . animation ( " anim_linkcopied " ) , text: presentationData. strings. CallList_ToastCallLinkCopied_Text, duration: 3 )
755768 case . openCall:
756769 break
757770 }
@@ -838,15 +851,15 @@ final class VideoChatScreenComponent: Component {
838851 } else {
839852 text = " "
840853 }
841- self . presentToast ( icon: . icon ( isSavedMessages ? " anim_savedmessages " : " anim_forward " ) , text: text, duration: 3 )
854+ self . presentToast ( icon: . animation ( isSavedMessages ? " anim_savedmessages " : " anim_forward " ) , text: text, duration: 3 )
842855 } )
843856 }
844857 shareController. actionCompleted = { [ weak self] in
845858 guard let self, let environment = self . environment, case let . group( groupCall) = self . currentCall else {
846859 return
847860 }
848861 let presentationData = groupCall. accountContext. sharedContext. currentPresentationData. with ( { $0 } ) . withUpdated ( theme: environment. theme)
849- self . presentToast ( icon: . icon ( " anim_linkcopied " ) , text: presentationData. strings. VoiceChat_InviteLinkCopiedText, duration: 3 )
862+ self . presentToast ( icon: . animation ( " anim_linkcopied " ) , text: presentationData. strings. VoiceChat_InviteLinkCopiedText, duration: 3 )
850863 }
851864 environment. controller ( ) ? . present ( shareController, in: . window( . root) )
852865 } )
@@ -889,15 +902,15 @@ final class VideoChatScreenComponent: Component {
889902 } else {
890903 text = " "
891904 }
892- self . presentToast ( icon: . icon ( isSavedMessages ? " anim_savedmessages " : " anim_forward " ) , text: text, duration: 3 )
905+ self . presentToast ( icon: . animation ( isSavedMessages ? " anim_savedmessages " : " anim_forward " ) , text: text, duration: 3 )
893906 } )
894907 }
895908 shareController. actionCompleted = { [ weak self] in
896909 guard let self, let environment = self . environment, case let . group( groupCall) = self . currentCall else {
897910 return
898911 }
899912 let presentationData = groupCall. accountContext. sharedContext. currentPresentationData. with ( { $0 } ) . withUpdated ( theme: environment. theme)
900- self . presentToast ( icon: . icon ( " anim_linkcopied " ) , text: presentationData. strings. VoiceChat_InviteLinkCopiedText, duration: 3 )
913+ self . presentToast ( icon: . animation ( " anim_linkcopied " ) , text: presentationData. strings. VoiceChat_InviteLinkCopiedText, duration: 3 )
901914 }
902915 environment. controller ( ) ? . present ( shareController, in: . window( . root) )
903916 }
@@ -2472,10 +2485,17 @@ final class VideoChatScreenComponent: Component {
24722485 areButtonsCollapsed = true
24732486 areButtonsActuallyCollapsed = false
24742487
2475- mainColumnWidth = min ( isLandscape ? 356.0 : 320.0 , availableSize. width - leftInset - rightInset - 340.0 )
2488+ let landscapeColumnWidth : CGFloat
2489+ if environment. metrics. isTablet {
2490+ landscapeColumnWidth = 356.0
2491+ } else {
2492+ landscapeColumnWidth = 340.0
2493+ }
2494+
2495+ mainColumnWidth = min ( isLandscape ? landscapeColumnWidth : 320.0 , availableSize. width - leftInset - rightInset - 340.0 )
24762496 mainColumnSideInset = 0.0
24772497 } else {
2478- areButtonsCollapsed = true //self.expandedParticipantsVideoState != nil
2498+ areButtonsCollapsed = true
24792499 areButtonsActuallyCollapsed = self . expandedParticipantsVideoState != nil
24802500
24812501 if availableSize. width > maxSingleColumnWidth {
@@ -2692,7 +2712,7 @@ final class VideoChatScreenComponent: Component {
26922712 if buttonsOnTheSide {
26932713 collapsedParticipantsClippingY = availableSize. height
26942714 } else {
2695- collapsedParticipantsClippingY = collapsedMicrophoneButtonFrame . minY - 16 .0
2715+ collapsedParticipantsClippingY = expandedMicrophoneButtonFrame . minY - 70 .0
26962716 }
26972717
26982718 let expandedParticipantsClippingY : CGFloat
@@ -2703,7 +2723,7 @@ final class VideoChatScreenComponent: Component {
27032723 expandedParticipantsClippingY = availableSize. height - max( 14.0 , environment. safeInsets. bottom)
27042724 }
27052725 } else {
2706- expandedParticipantsClippingY = expandedMicrophoneButtonFrame. minY - 24 .0
2726+ expandedParticipantsClippingY = expandedMicrophoneButtonFrame. minY - 28 .0
27072727 }
27082728
27092729
@@ -3429,7 +3449,7 @@ final class VideoChatScreenComponent: Component {
34293449 )
34303450
34313451 let availableInputMediaWidth = availableSize. width
3432- let heightAndOverflow = inputMediaNode. updateLayout ( width: availableInputMediaWidth, leftInset: 0.0 , rightInset: 0.0 , bottomInset: environment. safeInsets. bottom, standardInputHeight: environment. deviceMetrics. standardInputHeight ( inLandscape: false ) , inputHeight: environment. inputHeight, maximumHeight: availableSize. height, inputPanelHeight: 0.0 , transition: . immediate, interfaceState: presentationInterfaceState, layoutMetrics: environment. metrics, deviceMetrics: environment. deviceMetrics, isVisible: true , isExpanded: false )
3452+ let heightAndOverflow = inputMediaNode. updateLayout ( width: availableInputMediaWidth, leftInset: environment . safeInsets . left , rightInset: environment . safeInsets . right , bottomInset: environment. safeInsets. bottom, standardInputHeight: environment. deviceMetrics. standardInputHeight ( inLandscape: false ) , inputHeight: environment. inputHeight, maximumHeight: availableSize. height, inputPanelHeight: 0.0 , transition: . immediate, interfaceState: presentationInterfaceState, layoutMetrics: environment. metrics, deviceMetrics: environment. deviceMetrics, isVisible: true , isExpanded: false )
34333453 let inputNodeHeight = heightAndOverflow. 0
34343454 let inputNodeFrame = CGRect ( origin: CGPoint ( x: floorToScreenPixels ( ( availableSize. width - availableInputMediaWidth) / 2.0 ) , y: availableSize. height - inputNodeHeight) , size: CGSize ( width: availableInputMediaWidth, height: inputNodeHeight) )
34353455 transition. setFrame ( layer: inputMediaNode. layer, frame: inputNodeFrame)
@@ -3499,7 +3519,7 @@ final class VideoChatScreenComponent: Component {
34993519 placeholder: . plain( environment. strings. VoiceChat_MessagePlaceholder) ,
35003520 sendPaidMessageStars: nil ,
35013521 maxLength: characterLimit,
3502- queryTypes: [ . mention , . hashtag ] ,
3522+ queryTypes: [ ] ,
35033523 alwaysDarkWhenHasText: false ,
35043524 useGrayBackground: false ,
35053525 resetInputContents: nil ,
@@ -3609,6 +3629,7 @@ final class VideoChatScreenComponent: Component {
36093629 }
36103630 let inputPanelFrame = CGRect ( origin: CGPoint ( x: inputPanelOriginX, y: availableSize. height - inputPanelBottomInset - inputPanelSize. height - 3.0 ) , size: inputPanelSize)
36113631 if let inputPanelView = self . inputPanel. view {
3632+ inputPanelView. disablesInteractiveKeyboardGestureRecognizer = true
36123633 if inputPanelView. superview == nil {
36133634 self . containerView. addSubview ( inputPanelView)
36143635 }
0 commit comments