Przeglądaj źródła

fix link detection for audio messages as well

cyberta 5 lat temu
rodzic
commit
27c8a1e8b6

+ 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.
     /// Used to handle the cell's contentView's tap gesture.
     /// Return false when the contentView does not need to handle the gesture.
     /// Return false when the contentView does not need to handle the gesture.
     open override func cellContentView(canHandle touchPoint: CGPoint) -> Bool {
     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)
     }
     }
 }
 }