浏览代码

fix link detection for audio messages as well

cyberta 5 年之前
父节点
当前提交
27c8a1e8b6
共有 1 个文件被更改,包括 3 次插入1 次删除
  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)
     }
 }