Fix TT Dialog Cancel if duration
Force Cancel when Cancel button pressed (even if a duration exists in field when button is pressed)
This commit is contained in:
parent
ca8ad6ca9e
commit
51add9a4fd
|
@ -126,18 +126,19 @@ class TempTargetDialog : DialogFragmentWithDate() {
|
|||
binding.duration.value = defaultValueHelper.determineEatingSoonTTDuration().toDouble()
|
||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.eatingsoon)))
|
||||
}
|
||||
|
||||
R.id.activity -> {
|
||||
binding.temptarget.value = defaultValueHelper.determineActivityTT()
|
||||
binding.duration.value = defaultValueHelper.determineActivityTTDuration().toDouble()
|
||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.activity)))
|
||||
}
|
||||
|
||||
R.id.hypo -> {
|
||||
binding.temptarget.value = defaultValueHelper.determineHypoTT()
|
||||
binding.duration.value = defaultValueHelper.determineHypoTTDuration().toDouble()
|
||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.hypo)))
|
||||
}
|
||||
R.id.cancel -> {
|
||||
binding.duration.value = 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue