Update SettingsViewTreatmentsSettingsViewModel.swift

- correction to use the decimal keyboard when adjusting the micro-bolus threshold in the treatments section of the settings menu
This commit is contained in:
Paul Plant 2022-04-06 09:59:59 +02:00
parent ebd449a21d
commit bb38fe2dec
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ struct SettingsViewTreatmentsSettingsViewModel:SettingsViewModelProtocol {
})
case .smallBolusTreatmentThreshold:
return SettingsSelectedRowAction.askText(title: Texts_SettingsView.settingsviews_smallBolusTreatmentThreshold, message: Texts_SettingsView.settingsviews_smallBolusTreatmentThresholdMessage, keyboardType: .numberPad, text: UserDefaults.standard.smallBolusTreatmentThreshold.description, placeHolder: "0.0", actionTitle: nil, cancelTitle: nil, actionHandler: {(threshold:String) in if let threshold = Double(threshold) {UserDefaults.standard.smallBolusTreatmentThreshold = Double(threshold)}}, cancelHandler: nil, inputValidator: nil)
return SettingsSelectedRowAction.askText(title: Texts_SettingsView.settingsviews_smallBolusTreatmentThreshold, message: Texts_SettingsView.settingsviews_smallBolusTreatmentThresholdMessage, keyboardType: .decimalPad, text: UserDefaults.standard.smallBolusTreatmentThreshold.description, placeHolder: "0.0", actionTitle: nil, cancelTitle: nil, actionHandler: {(threshold:String) in if let threshold = Double(threshold) {UserDefaults.standard.smallBolusTreatmentThreshold = Double(threshold)}}, cancelHandler: nil, inputValidator: nil)
}
}