mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-13 01:23:12 +01:00
fix: wrong loader appear animation in hashtag scene issue
This commit is contained in:
parent
f36bcf25ec
commit
19d4a2ffc5
@ -117,10 +117,9 @@ extension HashtagTimelineViewController {
|
|||||||
aspectViewWillAppear(animated)
|
aspectViewWillAppear(animated)
|
||||||
|
|
||||||
viewModel.fetchTag()
|
viewModel.fetchTag()
|
||||||
guard viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial else { return }
|
if viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial {
|
||||||
|
viewModel.loadLatestStateMachine.enter(HashtagTimelineViewModel.LoadLatestState.Loading.self)
|
||||||
refreshControl.beginRefreshing()
|
}
|
||||||
refreshControl.sendActions(for: .valueChanged)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidDisappear(_ animated: Bool) {
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
|
@ -31,6 +31,14 @@ extension HashtagTimelineViewModel {
|
|||||||
timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate,
|
timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate,
|
||||||
threadReplyLoaderTableViewCellDelegate: nil
|
threadReplyLoaderTableViewCellDelegate: nil
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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