fix: notification list always reload issue
This commit is contained in:
parent
0dacea6326
commit
6a2fee12b5
|
@ -148,8 +148,10 @@ extension NotificationViewController {
|
||||||
|
|
||||||
tableView.deselectRow(with: transitionCoordinator, animated: animated)
|
tableView.deselectRow(with: transitionCoordinator, animated: animated)
|
||||||
|
|
||||||
// fetch latest notification when will appear
|
// fetch latest notification when scroll position is within half screen height to prevent list reload
|
||||||
viewModel.loadLatestStateMachine.enter(NotificationViewModel.LoadLatestState.Loading.self)
|
if tableView.contentOffset.y < view.frame.height * 0.5 {
|
||||||
|
viewModel.loadLatestStateMachine.enter(NotificationViewModel.LoadLatestState.Loading.self)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// needs trigger manually after onboarding dismiss
|
// needs trigger manually after onboarding dismiss
|
||||||
|
|
Loading…
Reference in New Issue