fix displaying overview buttons in pump suspend mode
This commit is contained in:
parent
c477649276
commit
efbcbaf885
1 changed files with 20 additions and 23 deletions
|
@ -1248,18 +1248,16 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
|||
quickWizardButton.setVisibility(View.GONE);
|
||||
|
||||
// **** Various treatment buttons ****
|
||||
if (carbsButton != null) {
|
||||
if (sp.getBoolean(R.string.key_show_carbs_button, true)
|
||||
&& (!activePlugin.getActivePump().getPumpDescription().storesCarbInfo ||
|
||||
(pump.isInitialized() && !pump.isSuspended()))) {
|
||||
if ((!activePlugin.getActivePump().getPumpDescription().storesCarbInfo ||
|
||||
(pump.isInitialized() && !pump.isSuspended())) && carbsButton != null) {
|
||||
if (sp.getBoolean(R.string.key_show_carbs_button, true)) {
|
||||
carbsButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
carbsButton.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (pump.isInitialized() && !pump.isSuspended()) {
|
||||
if (treatmentButton != null) {
|
||||
if (pump.isInitialized() && !pump.isSuspended() && treatmentButton != null) {
|
||||
if (sp.getBoolean(R.string.key_show_treatment_button, false)) {
|
||||
treatmentButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
@ -1280,7 +1278,6 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
|||
insulinButton.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// **** BG value ****
|
||||
if (lastBG == null) { //left this here as it seems you want to exit at this point if it is null...
|
||||
|
|
Loading…
Add table
Reference in a new issue