Fire EventInitializationChanged after pump init.

This commit is contained in:
Johannes Mockenhaupt 2017-11-12 18:38:22 +01:00
parent c22d18eabc
commit a52e159bf6
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -33,8 +33,8 @@ import info.nightscout.androidaps.db.DatabaseHelper;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.events.EventTreatmentChange;
import info.nightscout.androidaps.interfaces.ConstraintsInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PumpDescription;
@ -271,7 +271,11 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
return;
}
pump.initialized = true;
if (!pump.initialized) {
pump.initialized = true;
MainApp.bus().post(new EventInitializationChanged());
}
// ComboFragment updates state fully only after the pump has initialized,
// this fetches state again and updates the ui proper
runCommand(null, 0, ruffyScripter::readPumpState);