             CATransaction.begin()
             CATransaction.setDisableActions(true)
             
-            let indexPaths = self.dataController.insert(objs)
             self.collectionView?.performBatchUpdates({ 
                 self.collectionView?.insertItems(at: indexPaths)
             }, completion: { (completed) in

                objs.append(obj)
            }
            
            let contentHeight = self.collectionView!.contentSize.height
            let offsetY = self.collectionView!.contentOffset.y
            let bottomOffset = contentHeight - offsetY

extension ChatViewController {
    
    override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
        if indexPath.row == 0 {
            if let message = dataController.itemAt(indexPath)?.message {
                loadMoreMessagesFrom(date: message.createdAt)
            }
