mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Merge branch 'development' of https://github.com/MessageKit/MessageKit into tagonsoft_development
# Conflicts: # Example/Sources/Data Generation/SampleData.swift
This commit is contained in:
@@ -184,6 +184,8 @@ UICollectionViewDelegateFlowLayout, UICollectionViewDataSource {
|
||||
return collectionView.messagesDataSource?.numberOfItems(inSection: section, in: collectionView) ?? 0
|
||||
}
|
||||
|
||||
/// Note:
|
||||
/// If you override this method, remember to call MessagesDataSource's customCell(for:at:in:) for MessageKind.custom messages, if necessary
|
||||
open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
|
||||
guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
|
||||
@@ -215,7 +217,7 @@ UICollectionViewDelegateFlowLayout, UICollectionViewDataSource {
|
||||
audioController.configureAudioCell(cell, message: message) // this is needed especily when the cell is reconfigure while is playing sound
|
||||
return cell
|
||||
case .custom:
|
||||
fatalError(MessageKitError.customDataUnresolvedCell)
|
||||
return messagesDataSource.customCell(for: message, at: indexPath, in: messagesCollectionView)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user