mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Set MessageCellDelegate and fix broken gestures
This commit is contained in:
@@ -112,7 +112,10 @@ open class MessageCollectionViewCell<ContentView: UIView>: UICollectionViewCell
|
||||
|
||||
public func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
|
||||
|
||||
// TODO: - fix delegate
|
||||
// Check if delegate has already been set to reduce number of assignments
|
||||
if delegate == nil, let cellDelegate = messagesCollectionView.messageCellDelegate {
|
||||
delegate = cellDelegate
|
||||
}
|
||||
|
||||
if let displayDelegate = messagesCollectionView.messagesDisplayDelegate {
|
||||
|
||||
@@ -146,6 +149,7 @@ open class MessageCollectionViewCell<ContentView: UIView>: UICollectionViewCell
|
||||
|
||||
let messageTapGesture = UITapGestureRecognizer(target: self, action: #selector(didTapMessage))
|
||||
messageContainerView.addGestureRecognizer(messageTapGesture)
|
||||
messageContainerView.isUserInteractionEnabled = true
|
||||
self.messageTapGesture = messageTapGesture
|
||||
|
||||
let topLabelTapGesture = UITapGestureRecognizer(target: self, action: #selector(didTapTopLabel))
|
||||
|
||||
@@ -30,7 +30,6 @@ open class TextMessageCell: MessageCollectionViewCell<MessageLabel> {
|
||||
|
||||
override open weak var delegate: MessageCellDelegate? {
|
||||
didSet {
|
||||
print("Fix this never gets set")
|
||||
messageContentView.delegate = delegate
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user