Merge remote-tracking branch 'origin/dagger3' into rs

This commit is contained in:
Milos Kozak 2020-03-27 22:06:01 +01:00
commit a0b22dae69

View file

@ -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...