fix(android): add coordinate space fallbacks for android build
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user