Fix 💊-Issues (#1278)
* Remove pill after scrolling to top (#1275) * Don't show pill after switching timelines (#1275)
This commit is contained in:
parent
235499ec10
commit
cdced03c27
|
@ -590,7 +590,15 @@ extension HomeTimelineViewController {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||||
|
guard (scrollView.safeAreaInsets.top + scrollView.contentOffset.y) == 0 else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
hideTimelinePill()
|
||||||
|
}
|
||||||
|
|
||||||
private func savePositionBeforeScrollToTop() {
|
private func savePositionBeforeScrollToTop() {
|
||||||
// check save action interval
|
// check save action interval
|
||||||
// should not fast than 0.5s to prevent save when scrollToTop on-flying
|
// should not fast than 0.5s to prevent save when scrollToTop on-flying
|
||||||
|
|
|
@ -160,7 +160,7 @@ extension HomeTimelineViewModel.LoadLatestState {
|
||||||
FeedbackGenerator.shared.generate(.impact(.light))
|
FeedbackGenerator.shared.generate(.impact(.light))
|
||||||
}
|
}
|
||||||
|
|
||||||
if newStatuses.isNotEmpty {
|
if newStatuses.isNotEmpty && (previousState is HomeTimelineViewModel.LoadLatestState.ContextSwitch) == false {
|
||||||
viewModel.hasNewPosts.value = true
|
viewModel.hasNewPosts.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue