mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-25 08:21:40 +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)
|
||||
|
||||
viewModel.fetchTag()
|
||||
guard viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial else { return }
|
||||
|
||||
refreshControl.beginRefreshing()
|
||||
refreshControl.sendActions(for: .valueChanged)
|
||||
if viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial {
|
||||
viewModel.loadLatestStateMachine.enter(HashtagTimelineViewModel.LoadLatestState.Loading.self)
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
|
@ -31,6 +31,14 @@ extension HashtagTimelineViewModel {
|
||||
timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate,
|
||||
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