NewCarbsDialog: correct situation where Hypo TT can't be unchecked.
This commit is contained in:
parent
026c9f4788
commit
39dc914c2c
1 changed files with 4 additions and 2 deletions
|
@ -157,10 +157,12 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
|
|||
|
||||
BgReading bgReading = DatabaseHelper.actualBg();
|
||||
if (bgReading != null && bgReading.value < 72) {
|
||||
startHypoTTCheckbox.setOnCheckedChangeListener(null);
|
||||
startHypoTTCheckbox.setChecked(true);
|
||||
}
|
||||
// see #onCheckedChanged why listeners are registered like this
|
||||
startHypoTTCheckbox.setOnClickListener(this);
|
||||
} else {
|
||||
startHypoTTCheckbox.setOnCheckedChangeListener(this);
|
||||
}
|
||||
|
||||
setCancelable(true);
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
|
|
Loading…
Reference in a new issue