             collectionView?.insertItems(at: indexPaths)
             collectionView?.deleteItems(at: removedIndexPaths)
         }, completion: nil)
+
+        collectionView?.setNeedsLayout()
+        collectionView?.layoutIfNeeded()
     }
 
     func loadHistoryFromRemote(date: Date?) {

                self?.isRequestingHistory = false
                self?.loadMoreMessagesFrom(date: date, loadRemoteHistory: false)

                if messages.count == 0 {
                    self?.dataController.loadedAllMessages = true
                    self?.syncCollectionView()
                } else {

                loadMoreMessagesFrom(date: message.createdAt)
            }
        }

        resetScrollToBottomButtonPosition()
    }
}
