Go back to using a reserved section method

This commit is contained in:
Nathan Tannar
2019-04-02 22:43:09 -07:00
parent d81430c78d
commit d19e7df997
10 changed files with 201 additions and 183 deletions
@@ -222,10 +222,10 @@ final class AdvancedExampleViewController: ChatViewController {
fatalError("Ouch. nil data source for messages")
}
// guard !isSectionReservedForTypingBubble(indexPath.section) else {
// return super.collectionView(collectionView, cellForItemAt: indexPath)
// }
guard !isSectionReservedForTypingIndicator(indexPath.section) else {
return super.collectionView(collectionView, cellForItemAt: indexPath)
}
let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
if case .custom = message.kind {
let cell = messagesCollectionView.dequeueReusableCell(CustomCell.self, for: indexPath)