Small fixes
This commit is contained in:
parent
a2de14a44a
commit
084c8fd02f
|
@ -249,11 +249,10 @@ public class OmnipodManager {
|
|||
}
|
||||
|
||||
try {
|
||||
podStateManager.setTempBasal(DateTime.now().minus(OmnipodConstants.AVERAGE_TEMP_BASAL_COMMAND_COMMUNICATION_DURATION), rate, duration);
|
||||
podStateManager.setTempBasal(DateTime.now().plus(OmnipodConstants.AVERAGE_TEMP_BASAL_COMMAND_COMMUNICATION_DURATION), rate, duration);
|
||||
podStateManager.setTempBasalCertain(false);
|
||||
executeAndVerify(() -> communicationService.executeAction(new SetTempBasalAction(
|
||||
podStateManager, rate, duration, acknowledgementBeep, completionBeep)));
|
||||
podStateManager.setTempBasal(DateTime.now().minus(OmnipodConstants.AVERAGE_TEMP_BASAL_COMMAND_COMMUNICATION_DURATION), rate, duration);
|
||||
} catch (OmnipodException ex) {
|
||||
if (ex.isCertainFailure()) {
|
||||
podStateManager.clearTempBasal();
|
||||
|
|
|
@ -438,8 +438,18 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
omnipod_overview_temp_basal.setTextColor(textColor)
|
||||
}
|
||||
} else {
|
||||
omnipod_overview_temp_basal.text = PLACEHOLDER
|
||||
omnipod_overview_temp_basal.setTextColor(Color.WHITE)
|
||||
var text = PLACEHOLDER
|
||||
val textColor: Int
|
||||
|
||||
if (podStateManager.isTempBasalCertain) {
|
||||
textColor = Color.WHITE
|
||||
} else {
|
||||
textColor = Color.RED
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
|
||||
}
|
||||
|
||||
omnipod_overview_temp_basal.text = text
|
||||
omnipod_overview_temp_basal.setTextColor(textColor)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue