Parcourir la source

fix link detection for audio messages as well

cyberta il y a 5 ans
Parent
commit
27c8a1e8b6
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      deltachat-ios/MessageKit/Views/Cells/AudioMessageCell.swift

+ 3 - 1
deltachat-ios/MessageKit/Views/Cells/AudioMessageCell.swift

@@ -156,6 +156,8 @@ open class AudioMessageCell: MessageContentCell {
     /// Used to handle the cell's contentView's tap gesture.
     /// Return false when the contentView does not need to handle the gesture.
     open override func cellContentView(canHandle touchPoint: CGPoint) -> Bool {
-        return messageLabel.handleGesture(touchPoint)
+        let touchPointWithoutAudioPlayerHeight = CGPoint(x: touchPoint.x,
+                                                         y: touchPoint.y - audioPlayerView.frame.height)
+        return messageLabel.handleGesture(touchPointWithoutAudioPlayerHeight)
     }
 }