Fix 'last bolus' not being displayed on start.

This commit is contained in:
Johannes Mockenhaupt 2018-01-31 13:55:25 +01:00
parent 98d666098b
commit b32351145a
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -148,10 +148,10 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
String getStateSummary() {
PumpState ps = pump.state;
if (!validBasalRateProfileSelectedOnPump) {
return MainApp.gs(R.string.loopdisabled);
} else if (!pump.initialized) {
if (!pump.initialized) {
return MainApp.gs(R.string.combo_pump_state_initializing);
} else if (!validBasalRateProfileSelectedOnPump) {
return MainApp.gs(R.string.loopdisabled);
} else if (ps.activeAlert != null) {
return ps.activeAlert.errorCode != null
? "E" + ps.activeAlert.errorCode + ": " + ps.activeAlert.message
@ -401,7 +401,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
// ComboFragment updates state fully only after the pump has initialized,
// so force an update after initialization completed
updateLocalData(stateResult);
updateLocalData(runCommand(null, 1, ruffyScripter::readQuickInfo));
}
/** Updates local cache with state (reservoir level, last bolus ...) returned from the pump */