fix safety carbs sync
This commit is contained in:
parent
3f8e56d50e
commit
67c53b412d
2 changed files with 3 additions and 3 deletions
|
@ -200,11 +200,11 @@ class SafetyPlugin @Inject constructor(
|
|||
JSONObject()
|
||||
.putString(R.string.key_age, sp, resourceHelper)
|
||||
.putDouble(R.string.key_treatmentssafety_maxbolus, sp, resourceHelper)
|
||||
.putDouble(R.string.key_treatmentssafety_maxcarbs, sp, resourceHelper)
|
||||
.putInt(R.string.key_treatmentssafety_maxcarbs, sp, resourceHelper)
|
||||
|
||||
override fun applyConfiguration(configuration: JSONObject) {
|
||||
configuration.storeString(R.string.key_age, sp, resourceHelper)
|
||||
configuration.storeDouble(R.string.key_treatmentssafety_maxbolus, sp, resourceHelper)
|
||||
configuration.storeDouble(R.string.key_treatmentssafety_maxcarbs, sp, resourceHelper)
|
||||
configuration.storeInt(R.string.key_treatmentssafety_maxcarbs, sp, resourceHelper)
|
||||
}
|
||||
}
|
|
@ -235,7 +235,7 @@ class SWDefinition @Inject constructor(
|
|||
.validator {
|
||||
sp.contains(R.string.key_age)
|
||||
&& sp.getDouble(R.string.key_treatmentssafety_maxbolus, 0.0) > 0
|
||||
&& sp.getDouble(R.string.key_treatmentssafety_maxcarbs, 0.0) > 0
|
||||
&& sp.getInt(R.string.key_treatmentssafety_maxcarbs, 0) > 0
|
||||
}
|
||||
private val screenInsulin = SWScreen(injector, R.string.configbuilder_insulin)
|
||||
.skippable(false)
|
||||
|
|
Loading…
Reference in a new issue