Don't modify scroll position if dragging or decelerating

This commit is contained in:
Justin Mazzocchi 2021-02-02 21:32:31 -08:00
parent 25e8d80178
commit 0f53a1b676
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -335,7 +335,9 @@ private extension TableViewController {
guard let self = self else { return }
if let itemId = update.maintainScrollPositionItemId,
let indexPath = self.dataSource.indexPath(itemId: itemId) {
let indexPath = self.dataSource.indexPath(itemId: itemId),
!self.tableView.isDragging,
!self.tableView.isDecelerating {
if update.shouldAdjustContentInset {
self.tableView.contentInset.bottom = max(
self.tableView.safeAreaLayoutGuide.layoutFrame.height