LocationSharingView: Handle map credits action sheet.

This commit is contained in:
SBiOSoftWhare
2022-07-11 14:43:40 +02:00
parent 4da078f000
commit 77cf1ef1ce
3 changed files with 15 additions and 1 deletions
@@ -25,6 +25,8 @@ struct LocationSharingView: View {
@Environment(\.theme) private var theme: ThemeSwiftUI
@Environment(\.openURL) var openURL
// MARK: Public
@ObservedObject var context: LocationSharingViewModel.Context
@@ -34,7 +36,15 @@ struct LocationSharingView: View {
ZStack(alignment: .bottom) {
mapView
VStack(spacing: 0) {
MapCreditsView()
MapCreditsView(action: {
context.send(viewAction: .mapCreditsDidTap)
})
.padding(.bottom, 10.0)
.actionSheet(isPresented: $context.showMapCreditsSheet) {
return MapCreditsActionSheet(openURL: { url in
openURL(url)
}).sheet
}
buttonsView
.background(theme.colors.background)
.clipShape(RoundedCornerShape(radius: 8, corners: [.topLeft, .topRight]))