fix(android): add coordinate space fallbacks for android build

This commit is contained in:
Daniel Arantes Loverde
2026-04-17 15:57:17 -03:00
parent 66de1e3031
commit e54c0a029f
4 changed files with 26 additions and 2 deletions

View File

@@ -127,6 +127,15 @@ extension View {
self
#else
self.layoutPriority(value)
#endif
}
@ViewBuilder
func appNamedCoordinateSpace(_ name: String) -> some View {
#if os(Android)
self
#else
self.coordinateSpace(name: name)
#endif
}
}

View File

@@ -48,7 +48,7 @@ struct HomeView: View {
refreshCategories: true
)
}
.coordinateSpace(name: HomeScrollCoordinateSpace.name)
.appNamedCoordinateSpace(HomeScrollCoordinateSpace.name)
header(collapseProgress: collapseProgress, height: headerHeight)
.frame(maxWidth: .infinity, alignment: .top)

View File

@@ -74,7 +74,7 @@ struct StoreDetailView: View {
.refreshable {
await loadStoreData(forceRefresh: true)
}
.coordinateSpace(name: StoreDetailScrollCoordinateSpace.name)
.appNamedCoordinateSpace(StoreDetailScrollCoordinateSpace.name)
.ignoresSafeArea(edges: .top)
}
.ignoresSafeArea(edges: .top)