Merge branch 'development' of https://github.com/MessageKit/MessageKit into tagonsoft_development

# Conflicts:
#	Example/Sources/Data Generation/SampleData.swift
This commit is contained in:
Iosif Moldovan
2018-10-26 09:33:45 +03:00
14 changed files with 174 additions and 60 deletions
@@ -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)
}
}