mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 22:56:57 +02:00
MESSENGER-4008 add clickable copyright to staticlocationview
This commit is contained in:
+2
@@ -23,6 +23,7 @@ import Foundation
|
||||
enum StaticLocationViewingViewAction {
|
||||
case close
|
||||
case share
|
||||
case mapCreditsDidTap
|
||||
}
|
||||
|
||||
enum StaticLocationViewingViewModelResult {
|
||||
@@ -59,4 +60,5 @@ struct StaticLocationViewingViewState: BindableState {
|
||||
|
||||
struct StaticLocationViewingViewBindings {
|
||||
var alertInfo: AlertInfo<LocationSharingAlertType>?
|
||||
var showMapCreditsSheet = false
|
||||
}
|
||||
|
||||
+2
@@ -63,6 +63,8 @@ class StaticLocationViewingViewModel: StaticLocationViewingViewModelType, Static
|
||||
completion?(.close)
|
||||
case .share:
|
||||
completion?(.share(state.sharedAnnotation.coordinate))
|
||||
case .mapCreditsDidTap:
|
||||
state.bindings.showMapCreditsSheet.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-1
@@ -22,6 +22,8 @@ struct StaticLocationView: View {
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.theme) private var theme
|
||||
@Environment(\.openURL) var openURL
|
||||
@Environment(\.safeAreaInsets) private var safeAreaInsets
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@@ -40,7 +42,15 @@ struct StaticLocationView: View {
|
||||
userLocation: Binding.constant(nil),
|
||||
mapCenterCoordinate: Binding.constant(nil),
|
||||
errorSubject: viewModel.viewState.errorSubject)
|
||||
MapCreditsView()
|
||||
MapCreditsView(action: {
|
||||
viewModel.send(viewAction: .mapCreditsDidTap)
|
||||
})
|
||||
.padding(.bottom, 10.0 + safeAreaInsets.bottom)
|
||||
.actionSheet(isPresented: $viewModel.showMapCreditsSheet) {
|
||||
MapCreditsActionSheet(openURL: { url in
|
||||
openURL(url)
|
||||
}).sheet
|
||||
}
|
||||
}
|
||||
.ignoresSafeArea(.all, edges: [.bottom])
|
||||
.toolbar {
|
||||
|
||||
Reference in New Issue
Block a user