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
1 changed files with 3 additions and 2 deletions
|
@ -126,18 +126,19 @@ class TempTargetDialog : DialogFragmentWithDate() {
|
||||||
binding.duration.value = defaultValueHelper.determineEatingSoonTTDuration().toDouble()
|
binding.duration.value = defaultValueHelper.determineEatingSoonTTDuration().toDouble()
|
||||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.eatingsoon)))
|
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.eatingsoon)))
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.activity -> {
|
R.id.activity -> {
|
||||||
binding.temptarget.value = defaultValueHelper.determineActivityTT()
|
binding.temptarget.value = defaultValueHelper.determineActivityTT()
|
||||||
binding.duration.value = defaultValueHelper.determineActivityTTDuration().toDouble()
|
binding.duration.value = defaultValueHelper.determineActivityTTDuration().toDouble()
|
||||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.activity)))
|
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.activity)))
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.hypo -> {
|
R.id.hypo -> {
|
||||||
binding.temptarget.value = defaultValueHelper.determineHypoTT()
|
binding.temptarget.value = defaultValueHelper.determineHypoTT()
|
||||||
binding.duration.value = defaultValueHelper.determineHypoTTDuration().toDouble()
|
binding.duration.value = defaultValueHelper.determineHypoTTDuration().toDouble()
|
||||||
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.hypo)))
|
binding.reason.setSelection(reasonList.indexOf(resourceHelper.gs(R.string.hypo)))
|
||||||
}
|
}
|
||||||
|
R.id.cancel -> {
|
||||||
|
binding.duration.value = 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue