mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-25 08:21:40 +01:00
feat: add loader for initial snapshot in notification scene
This commit is contained in:
parent
d9490533ee
commit
6400729367
@ -29,6 +29,14 @@ extension NotificationViewModel {
|
||||
delegate: delegate,
|
||||
dependency: dependency
|
||||
)
|
||||
|
||||
var snapshot = NSDiffableDataSourceSnapshot<NotificationSection, NotificationItem>()
|
||||
snapshot.appendSections([.main])
|
||||
diffableDataSource.apply(snapshot)
|
||||
|
||||
// workaround to append loader wrong animation issue
|
||||
snapshot.appendItems([.bottomLoader], toSection: .main)
|
||||
diffableDataSource.apply(snapshot)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ final class NotificationViewModel: NSObject {
|
||||
|
||||
// output
|
||||
var diffableDataSource: UITableViewDiffableDataSource<NotificationSection, NotificationItem>!
|
||||
|
||||
// top loader
|
||||
private(set) lazy var loadLatestStateMachine: GKStateMachine = {
|
||||
// exclude timeline middle fetcher state
|
||||
|
Loading…
Reference in New Issue
Block a user