fix button visibility logic
This commit is contained in:
parent
9c53034805
commit
10bd1d2df0
|
@ -81,7 +81,7 @@ class TreatmentsBolusFragment : DaggerFragment() {
|
|||
})
|
||||
}
|
||||
}
|
||||
val nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) && buildHelper.isEngineeringMode()
|
||||
val nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) || !buildHelper.isEngineeringMode()
|
||||
if (nsUploadOnly) treatments_reshreshfromnightscout.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ class TreatmentsCareportalFragment : DaggerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
val nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) && buildHelper.isEngineeringMode()
|
||||
val nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) || !buildHelper.isEngineeringMode()
|
||||
if (nsUploadOnly) careportal_refreshfromnightscout.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (sp.getBoolean(R.string.key_ns_upload_only, true) && buildHelper.isEngineeringMode()) profileswitch_refreshfromnightscout.visibility = View.GONE
|
||||
if (sp.getBoolean(R.string.key_ns_upload_only, true) || !buildHelper.isEngineeringMode()) profileswitch_refreshfromnightscout.visibility = View.GONE
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
|
|
@ -182,7 +182,7 @@ public class TreatmentsTempTargetFragment extends DaggerFragment {
|
|||
rxBus.send(new EventNSClientRestart());
|
||||
}));
|
||||
|
||||
boolean nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) && buildHelper.isEngineeringMode();
|
||||
boolean nsUploadOnly = sp.getBoolean(R.string.key_ns_upload_only, true) || !buildHelper.isEngineeringMode();
|
||||
if (nsUploadOnly)
|
||||
refreshFromNS.setVisibility(View.GONE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue