Skip to content

Commit

Permalink
move the bottom sheet where it can get to the router
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarela committed Sep 19, 2024
1 parent 69d0b98 commit 3e81da8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Marlin/Marlin/MarlinView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct MarlinView: View {
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
@EnvironmentObject var dataSourceList: DataSourceList
@EnvironmentObject var appState: AppState

@State var selection: String?
@State var showBottomSheet: Bool = false

Expand Down Expand Up @@ -87,9 +87,6 @@ struct MarlinView: View {
}
}
}
.background {
MarlinDataBottomSheet()
}
.background {
MappedDataSourcesFilter(showBottomSheet: $filterOpen)
.environmentObject(dataSourceList)
Expand Down
3 changes: 3 additions & 0 deletions Marlin/Marlin/Views/MarlinCompactWidth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ struct MarlinCompactWidth: View {
.accessibilityElement(children: .contain)
.accessibilityLabel("Marlin Map Tab")
}
.background {
MarlinDataBottomSheet()
}
// this affects text buttons, image buttons need .foregroundColor set on them
.tint(Color.onPrimaryColor)
.navigationViewStyle(.stack)
Expand Down
3 changes: 3 additions & 0 deletions Marlin/Marlin/Views/MarlinRegularWidth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ struct MarlinRegularWidth: View {
loadingCapsule()
}
}
.background {
MarlinDataBottomSheet()
}
.marlinRoutes()
.modifier(CombinedSourcesFilterButton(
filterOpen: $filterOpen,
Expand Down

0 comments on commit 3e81da8

Please sign in to comment.