forked from zelo72/mastodon-ios
fix: home timeline initial setup may get wrong content offset issue
This commit is contained in:
parent
d350213f6c
commit
27cdc44532
|
@ -32,14 +32,11 @@ extension HomeTimelineViewModel {
|
||||||
timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate,
|
timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate,
|
||||||
threadReplyLoaderTableViewCellDelegate: nil
|
threadReplyLoaderTableViewCellDelegate: nil
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// make initial snapshot animation smooth
|
||||||
var snapshot = NSDiffableDataSourceSnapshot<StatusSection, Item>()
|
var snapshot = NSDiffableDataSourceSnapshot<StatusSection, Item>()
|
||||||
snapshot.appendSections([.main])
|
snapshot.appendSections([.main])
|
||||||
diffableDataSource?.apply(snapshot)
|
diffableDataSource?.apply(snapshot)
|
||||||
|
|
||||||
// workaround to append loader wrong animation issue
|
|
||||||
snapshot.appendItems([.bottomLoader], toSection: .main)
|
|
||||||
diffableDataSource?.apply(snapshot)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue