mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-25 08:21:40 +01:00
feat: add loader for initial snapshot and fix loader animation issue
This commit is contained in:
parent
80330c0809
commit
091856ddf0
@ -33,9 +33,13 @@ extension HomeTimelineViewModel {
|
||||
threadReplyLoaderTableViewCellDelegate: nil
|
||||
)
|
||||
|
||||
// var snapshot = NSDiffableDataSourceSnapshot<StatusSection, Item>()
|
||||
// snapshot.appendSections([.main])
|
||||
// diffableDataSource?.apply(snapshot)
|
||||
var snapshot = NSDiffableDataSourceSnapshot<StatusSection, Item>()
|
||||
snapshot.appendSections([.main])
|
||||
diffableDataSource?.apply(snapshot)
|
||||
|
||||
// workaround to append loader wrong animation issue
|
||||
snapshot.appendItems([.bottomLoader], toSection: .main)
|
||||
diffableDataSource?.apply(snapshot)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ extension UserTimelineViewModel {
|
||||
// set empty section to make update animation top-to-bottom style
|
||||
var snapshot = NSDiffableDataSourceSnapshot<StatusSection, Item>()
|
||||
snapshot.appendSections([.main])
|
||||
diffableDataSource?.apply(snapshot)
|
||||
|
||||
// workaround to append loader wrong animation issue
|
||||
snapshot.appendItems([.bottomLoader], toSection: .main)
|
||||
diffableDataSource?.apply(snapshot)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user