@@ -56,12 +56,6 @@ struct AppTPActivityView: View {
56
56
57
57
var listState : some View {
58
58
VStack {
59
- Picker ( " Tracker Sorting " , selection: $viewModel. trackerSortingOption) {
60
- Text ( " Sort By Count " ) . tag ( AppTrackingProtectionListViewModel . TrackerSorting. count)
61
- Text ( " Sort By Date " ) . tag ( AppTrackingProtectionListViewModel . TrackerSorting. timestamp)
62
- }
63
- . pickerStyle ( . segmented)
64
-
65
59
ForEach ( viewModel. sections, id: \. name) { section in
66
60
Section ( content: {
67
61
LazyVStack ( alignment: . leading, spacing: 0 ) {
@@ -89,7 +83,7 @@ struct AppTPActivityView: View {
89
83
. cornerRadius ( Const . Size. cornerRadius)
90
84
} , header: {
91
85
HStack {
92
- Text ( viewModel. formattedDate ( section. name) )
86
+ Text ( viewModel. formattedDate ( section. name) . uppercased ( ) )
93
87
. font ( Font ( uiFont: Const . Font. sectionHeader) )
94
88
. foregroundColor ( . infoText)
95
89
. padding ( . top)
@@ -100,18 +94,14 @@ struct AppTPActivityView: View {
100
94
}
101
95
} )
102
96
}
103
-
104
- Toggle ( isOn: $viewModel. debugModeEnabled, label: {
105
- Text ( " Show Additional Tracker Information " )
106
- } )
107
- . padding ( . top, 8 )
108
97
}
109
98
}
110
99
111
100
var manageSection : some View {
112
101
Section {
113
102
VStack ( alignment: . leading, spacing: 0 ) {
114
103
NavigationLink ( destination: AppTPManageTrackersView ( viewModel: AppTPManageTrackersViewModel ( ) ,
104
+ feedbackModel: feedbackModel,
115
105
imageCache: imageCache) ) {
116
106
HStack {
117
107
Text ( UserText . appTPManageTrackers)
@@ -125,6 +115,7 @@ struct AppTPActivityView: View {
125
115
}
126
116
127
117
Divider ( )
118
+ . padding ( . leading)
128
119
129
120
NavigationLink ( destination: AppTPBreakageFormView ( feedbackModel: feedbackModel) ) {
130
121
HStack {
@@ -144,7 +135,7 @@ struct AppTPActivityView: View {
144
135
}
145
136
}
146
137
147
- var body : some View {
138
+ var scrollView : some View {
148
139
ScrollView {
149
140
LazyVStack ( alignment: . center, spacing: 0 ) {
150
141
Section {
@@ -174,27 +165,43 @@ struct AppTPActivityView: View {
174
165
. background ( Color . viewBackground)
175
166
. navigationTitle ( UserText . appTPNavTitle)
176
167
}
168
+
169
+ @ViewBuilder
170
+ var scrollWithBackgroud : some View {
171
+ if #available( iOS 16 , * ) {
172
+ scrollView
173
+ . scrollContentBackground ( . hidden)
174
+ . background ( Color . viewBackground)
175
+ } else {
176
+ scrollView
177
+ . background ( Color . viewBackground)
178
+ }
179
+ }
180
+
181
+ var body : some View {
182
+ scrollWithBackgroud
183
+ }
177
184
}
178
185
179
186
private enum Const {
180
187
enum Font {
181
- static let sectionHeader = UIFont . semiBoldAppFont ( ofSize: 15 )
188
+ static let sectionHeader = UIFont . systemFont ( ofSize: 12 )
182
189
static let info = UIFont . appFont ( ofSize: 16 )
183
190
}
184
191
185
192
enum Size {
186
193
static let cornerRadius : CGFloat = 12
187
194
static let sectionIndentation : CGFloat = 16
188
- static let sectionHeaderBottom : CGFloat = 6
195
+ static let sectionHeaderBottom : CGFloat = - 2
189
196
static let standardCellHeight : CGFloat = 44
190
197
}
191
198
}
192
199
193
200
private extension Color {
194
201
static let infoText = Color ( " AppTPDomainColor " )
195
- static let buttonColor = Color ( " AppTPToggleColor " )
196
- static let cellBackground = Color ( " AppTPCellBackgroundColor " )
197
- static let viewBackground = Color ( " AppTPViewBackgroundColor " )
202
+ static let buttonColor = Color ( designSystemColor : . accent )
203
+ static let cellBackground = Color ( designSystemColor : . surface )
204
+ static let viewBackground = Color ( designSystemColor : . background )
198
205
}
199
206
200
207
#endif
0 commit comments