File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
CriticalMapsKit/Sources/AppFeature Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ public struct AppView: View {
23
23
viewStore = ViewStore ( store)
24
24
}
25
25
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
+
26
34
public var body : some View {
27
35
ZStack ( alignment: . topLeading) {
28
36
MapFeatureView (
@@ -39,10 +47,7 @@ public struct AppView: View {
39
47
. contextMenu {
40
48
Button (
41
49
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 " ) }
46
51
)
47
52
}
48
53
}
@@ -147,7 +152,7 @@ public struct AppView: View {
147
152
? Color . white
148
153
: Color ( . attention)
149
154
)
150
- . accessibilityLabel ( Text ( " internet not available" ) )
155
+ . accessibilityLabel ( Text ( " Internet not available" ) )
151
156
. padding ( )
152
157
. background (
153
158
Group {
You can’t perform that action at this time.
0 commit comments