fix(android): enable home header scroll observer

This commit is contained in:
Daniel Arantes Loverde
2026-04-17 14:56:36 -03:00
parent 16df939a1c
commit 5f7e8b29d5
3 changed files with 4 additions and 6 deletions

View File

@@ -4,7 +4,6 @@ enum HomeScrollCoordinateSpace {
static let name = "home-scroll"
}
#if os(iOS)
struct HomeScrollOffsetPreferenceKey: PreferenceKey {
static let defaultValue: CGFloat = 0
@@ -32,4 +31,3 @@ struct ScrollOffsetObserver: View {
}
}
}
#endif

View File

@@ -449,16 +449,12 @@ struct HomeView: View {
@ViewBuilder
private var scrollOffsetObserver: some View {
#if os(iOS)
ScrollOffsetObserver { y in
// Use only upward displacement for collapse and ignore top bounce.
let normalized = max(0, y)
scrollOffset = normalized
}
.frame(width: 0, height: 0)
#else
EmptyView()
#endif
}
private var addressCacheScope: String {