Skip to content

Commit 15588a6

Browse files
committed
fix contextmenu title
1 parent d6b0fd7 commit 15588a6

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

CriticalMapsKit/Sources/AppFeature/AppView.swift

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ public struct AppView: View {
2323
viewStore = ViewStore(store)
2424
}
2525

26+
private var contextMenuTitle: String {
27+
if viewStore.bottomSheetPosition == .hidden {
28+
return L10n.Map.NextRideEvents.showAll
29+
} else {
30+
return L10n.Map.NextRideEvents.hideAll
31+
}
32+
}
33+
2634
public var body: some View {
2735
ZStack(alignment: .topLeading) {
2836
MapFeatureView(
@@ -39,10 +47,7 @@ public struct AppView: View {
3947
.contextMenu {
4048
Button(
4149
action: { viewStore.send(.set(\.$bottomSheetPosition, .relative(0.4))) },
42-
label: {
43-
let title = viewStore.bottomSheetPosition == .hidden ? L10n.Map.NextRideEvents.hideAll : L10n.Map.NextRideEvents.showAll
44-
Label(title, systemImage: "list.bullet")
45-
}
50+
label: { Label(contextMenuTitle, systemImage: "list.bullet") }
4651
)
4752
}
4853
}
@@ -147,7 +152,7 @@ public struct AppView: View {
147152
? Color.white
148153
: Color(.attention)
149154
)
150-
.accessibilityLabel(Text("internet not available"))
155+
.accessibilityLabel(Text("Internet not available"))
151156
.padding()
152157
.background(
153158
Group {

0 commit comments

Comments
 (0)