Improve flickering when interacting with posts (IOS-176)
This commit is contained in:
parent
1f73bee772
commit
112dce06f5
|
@ -76,12 +76,12 @@ extension HomeTimelineViewModel {
|
||||||
oldSnapshot: oldSnapshot,
|
oldSnapshot: oldSnapshot,
|
||||||
newSnapshot: newSnapshot
|
newSnapshot: newSnapshot
|
||||||
) else {
|
) else {
|
||||||
self.updateSnapshotUsingReloadData(snapshot: newSnapshot)
|
await self.updateDataSource(snapshot: newSnapshot, animatingDifferences: false)
|
||||||
self.didLoadLatest.send()
|
self.didLoadLatest.send()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
self.updateSnapshotUsingReloadData(snapshot: newSnapshot)
|
await self.updateDataSource(snapshot: newSnapshot, animatingDifferences: false)
|
||||||
tableView.scrollToRow(at: difference.targetIndexPath, at: .top, animated: false)
|
tableView.scrollToRow(at: difference.targetIndexPath, at: .top, animated: false)
|
||||||
var contentOffset = tableView.contentOffset
|
var contentOffset = tableView.contentOffset
|
||||||
contentOffset.y = tableView.contentOffset.y - difference.sourceDistanceToTableViewTopEdge
|
contentOffset.y = tableView.contentOffset.y - difference.sourceDistanceToTableViewTopEdge
|
||||||
|
|
Loading…
Reference in New Issue