@@ -219,11 +219,14 @@ public final class ChatUserInfoItemNode: ListViewItemNode, ASGestureRecognizerDe
219219 }
220220
221221 public override func gestureRecognizerShouldBegin( _ gestureRecognizer: UIGestureRecognizer ) -> Bool {
222- let location = gestureRecognizer. location ( in: self . offsetContainer. view)
223- if let backgroundContent = self . backgroundContent, backgroundContent. frame. contains ( location) {
224- return true
222+ if gestureRecognizer. view === self . offsetContainer. view {
223+ let location = gestureRecognizer. location ( in: self . offsetContainer. view)
224+ if let backgroundContent = self . backgroundContent, backgroundContent. frame. contains ( location) {
225+ return true
226+ }
227+ return false
225228 }
226- return false
229+ return true
227230 }
228231
229232 @objc private func tapGesture( _ gestureRecognizer: UITapGestureRecognizer ) {
@@ -366,7 +369,7 @@ public final class ChatUserInfoItemNode: ListViewItemNode, ASGestureRecognizerDe
366369 var estimatedValueOffset : CGFloat = 0.0
367370 if groupsInCommonCount > 0 {
368371 groupsValueText = NSMutableAttributedString ( string: item. presentationData. strings. Chat_NonContactUser_GroupsCount ( groupsInCommonCount) , font: Font . semibold ( 13.0 ) , textColor: primaryTextColor)
369- estimatedValueOffset = avatarImageSize + CGFloat( min ( 2 , max ( 0 , item. groupsInCommonCount - 1 ) ) ) * avatarSpacing + 4.0
372+ estimatedValueOffset = avatarImageSize + CGFloat( min ( 2 , max ( 0 , item. groupsInCommonCount - 1 ) ) ) * avatarSpacing + 4.0 + 10.0
370373 } else {
371374 groupsValueText = NSMutableAttributedString ( string: " " , font: Font . semibold ( 13.0 ) , textColor: primaryTextColor)
372375 }
@@ -380,7 +383,7 @@ public final class ChatUserInfoItemNode: ListViewItemNode, ASGestureRecognizerDe
380383 backgroundSize. height += groupsValueLayoutAndApply? . 0 . size. height ?? 0.0
381384
382385 maxTitleWidth = max ( maxTitleWidth, groupsTitleLayoutAndApply? . 0 . size. width ?? 0 )
383- maxValueWidth = max ( maxValueWidth, groupsValueLayoutAndApply? . 0 . size. width ?? 0 + estimatedValueOffset)
386+ maxValueWidth = max ( maxValueWidth, ( groupsValueLayoutAndApply? . 0 . size. width ?? 0 ) + estimatedValueOffset)
384387 } else {
385388 groupsTitleLayoutAndApply = nil
386389 groupsValueLayoutAndApply = nil
@@ -474,15 +477,15 @@ public final class ChatUserInfoItemNode: ListViewItemNode, ASGestureRecognizerDe
474477
475478 var attributeMidpoints : [ CGFloat ] = [ ]
476479
477- func appendAttributeMidpoint( titleLayout: TextNodeLayout ? , valueLayout: TextNodeLayout ? ) {
480+ func appendAttributeMidpoint( titleLayout: TextNodeLayout ? , valueLayout: TextNodeLayout ? , valueOffset : CGFloat = 0.0 ) {
478481 if let valueLayout {
479- let midpoint = backgroundSize. width - horizontalContentInset - valueLayout. size. width - attributeSpacing / 2.0
482+ let midpoint = backgroundSize. width - horizontalContentInset - valueLayout. size. width - valueOffset - attributeSpacing / 2.0
480483 attributeMidpoints. append ( midpoint)
481484 }
482485 }
483486 appendAttributeMidpoint ( titleLayout: phoneCountryTitleLayoutAndApply? . 0 , valueLayout: phoneCountryValueLayoutAndApply? . 0 )
484487 appendAttributeMidpoint ( titleLayout: registrationDateTitleLayoutAndApply? . 0 , valueLayout: registrationDateValueLayoutAndApply? . 0 )
485- appendAttributeMidpoint ( titleLayout: groupsTitleLayoutAndApply? . 0 , valueLayout: groupsValueLayoutAndApply? . 0 )
488+ appendAttributeMidpoint ( titleLayout: groupsTitleLayoutAndApply? . 0 , valueLayout: groupsValueLayoutAndApply? . 0 , valueOffset : estimatedValueOffset )
486489
487490 let middleX = floorToScreenPixels ( attributeMidpoints. min ( ) ?? backgroundSize. width / 2.0 )
488491
0 commit comments