Skip to content

Commit

Permalink
Update content insets in animation block.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Ahapkin committed May 22, 2018
1 parent 5085723 commit 2ccb6c5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,18 @@ extension BaseChatViewController: ChatDataSourceDelegateProtocol {
DispatchQueue.main.async(execute: onAllBatchUpdatesFinished)
}
})
if self.placeMessagesFromBottom {
self.adjustCollectionViewInsets(shouldUpdateContentOffset: false)
}
})
} else {
self.visibleCells = [:]
updateModelClosure()
self.collectionView.reloadData()
self.collectionView.collectionViewLayout.prepare()
}

if self.placeMessagesFromBottom {
self.adjustCollectionViewInsets(shouldUpdateContentOffset: false)
if self.placeMessagesFromBottom {
self.adjustCollectionViewInsets(shouldUpdateContentOffset: false)
}
}

switch scrollAction {
Expand Down

0 comments on commit 2ccb6c5

Please sign in to comment.