mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
5982: Clean code and add tests
This commit is contained in:
@@ -36,11 +36,9 @@ struct LocationSharingView: View {
|
||||
mapView
|
||||
VStack(spacing: 0) {
|
||||
MapCreditsView()
|
||||
if context.viewState.shareButtonVisible {
|
||||
buttonsView
|
||||
.background(theme.colors.background)
|
||||
.clipShape(RoundedCornerShape(radius: 8, corners: [.topLeft, .topRight]))
|
||||
}
|
||||
buttonsView
|
||||
.background(theme.colors.background)
|
||||
.clipShape(RoundedCornerShape(radius: 8, corners: [.topLeft, .topRight]))
|
||||
}
|
||||
}
|
||||
.toolbar {
|
||||
@@ -54,17 +52,6 @@ struct LocationSharingView: View {
|
||||
.font(.headline)
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
}
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
if context.viewState.displayExistingLocation {
|
||||
Button {
|
||||
context.send(viewAction: .share)
|
||||
} label: {
|
||||
Image(uiImage: Asset.Images.locationShareIcon.image)
|
||||
.accessibilityIdentifier("LocationSharingView.shareButton")
|
||||
}
|
||||
.disabled(!context.viewState.shareButtonEnabled)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.introspectNavigationController { navigationController in
|
||||
|
||||
Reference in New Issue
Block a user