Improve flickering when interacting with posts (IOS-176)

This commit is contained in:
Marcus Kida 2023-12-01 09:52:08 +01:00
parent 1f73bee772
commit 112dce06f5
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
1 changed files with 2 additions and 2 deletions

View File

@ -76,12 +76,12 @@ extension HomeTimelineViewModel {
oldSnapshot: oldSnapshot,
newSnapshot: newSnapshot
) else {
self.updateSnapshotUsingReloadData(snapshot: newSnapshot)
await self.updateDataSource(snapshot: newSnapshot, animatingDifferences: false)
self.didLoadLatest.send()
return
}
self.updateSnapshotUsingReloadData(snapshot: newSnapshot)
await self.updateDataSource(snapshot: newSnapshot, animatingDifferences: false)
tableView.scrollToRow(at: difference.targetIndexPath, at: .top, animated: false)
var contentOffset = tableView.contentOffset
contentOffset.y = tableView.contentOffset.y - difference.sourceDistanceToTableViewTopEdge