@@ -30,10 +30,10 @@ struct MicrobolusView: View {
30
30
@Published fileprivate var pickerMinimumBolusSizeIndex : Int
31
31
@Published fileprivate var partialApplicationIndex : Int
32
32
33
- fileprivate let values = stride ( from: 30 , to: 301 , by: 5 ) . map { $0 }
33
+ fileprivate let values = stride ( from: 30 , to: 301 , by: 5 ) . map { $0 } + [ 1440 ] // + 1 day
34
34
// @ToDo: Should be able to get the to limit from the settings but for now defult to a low value
35
35
fileprivate let minimumBolusSizeValues = stride ( from: 0.0 , to: 0.51 , by: 0.05 ) . map { $0 }
36
- fileprivate let partialApplicationValues = stride ( from: 0.1 , to: 1.01 , by: 0.1 ) . map { $0 }
36
+ fileprivate let partialApplicationValues = stride ( from: 0.1 , to: 1.01 , by: 0.05 ) . map { $0 }
37
37
38
38
private var cancellable : AnyCancellable !
39
39
fileprivate let formatter : NumberFormatter = {
@@ -134,13 +134,13 @@ struct MicrobolusView: View {
134
134
135
135
var body : some View {
136
136
Form {
137
- self . topSection
138
- self . withCobSection
139
- self . withoutCobSection
140
- self . partialApplicationSection
141
- self . safeModeSection
142
- self . temporaryOverridesSection
143
- self . otherOptionsSection
137
+ topSection
138
+ partialApplicationSection
139
+ withCobSection
140
+ withoutCobSection
141
+ safeModeSection
142
+ temporaryOverridesSection
143
+ otherOptionsSection
144
144
}
145
145
. navigationBarTitle ( " Microboluses " )
146
146
. modifier ( AdaptsToSoftwareKeyboard ( ) )
@@ -170,7 +170,11 @@ struct MicrobolusView: View {
170
170
171
171
Picker ( selection: $viewModel. pickerWithCOBIndex, label: Text ( " Maximum Size " ) ) {
172
172
ForEach ( 0 ..< viewModel. values. count) { index in
173
- Text ( " \( self . viewModel. values [ index] ) " ) . tag ( index)
173
+ if index == self . viewModel. values. count - 1 {
174
+ Text ( " Not limited " ) . tag ( index)
175
+ } else {
176
+ Text ( " \( self . viewModel. values [ index] ) " ) . tag ( index)
177
+ }
174
178
}
175
179
}
176
180
}
@@ -185,7 +189,11 @@ struct MicrobolusView: View {
185
189
}
186
190
Picker ( selection: $viewModel. pickerWithoutCOBIndex, label: Text ( " Maximum Size " ) ) {
187
191
ForEach ( 0 ..< viewModel. values. count) { index in
188
- Text ( " \( self . viewModel. values [ index] ) " ) . tag ( index)
192
+ if index == self . viewModel. values. count - 1 {
193
+ Text ( " Not limited " ) . tag ( index)
194
+ } else {
195
+ Text ( " \( self . viewModel. values [ index] ) " ) . tag ( index)
196
+ }
189
197
}
190
198
}
191
199
}
0 commit comments