fix scroll header jumping on profiles with large headers

This commit is contained in:
vineyardbovines
2026-03-03 10:34:04 -05:00
committed by Samuel Newman
parent b84f28f884
commit 32c12ab867
2 changed files with 30 additions and 14 deletions
@@ -76,11 +76,10 @@ class ExpoScrollForwarderView: ExpoView, UIGestureRecognizerDelegate {
let translation = sender.translation(in: self).y
if sender.state == .began {
if sv.contentOffset.y < 0 {
sv.contentOffset.y = 0
}
self.initialOffset = sv.contentOffset.y
// Use max(0) so gesture deltas compute correctly, but don't mutate
// contentOffset snapping it to 0 causes a visible jump on profiles
// with large headers where the user is scrolled into negative territory.
self.initialOffset = max(sv.contentOffset.y, 0)
}
if sender.state == .changed {