use EventAppInitialized in xdrip status line

This commit is contained in:
Milos Kozak 2018-08-01 14:46:19 +02:00
parent 796c1becc2
commit e6fae87abf

View file

@ -14,6 +14,7 @@ import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.events.EventAppInitialized;
import info.nightscout.androidaps.events.EventExtendedBolusChange;
import info.nightscout.androidaps.events.EventNewBG;
import info.nightscout.androidaps.events.EventPreferenceChange;
@ -80,7 +81,6 @@ public class StatuslinePlugin extends PluginBase {
@Override
protected void onStart() {
MainApp.bus().register(this);
sendStatus();
super.onStart();
}
@ -182,6 +182,11 @@ public class StatuslinePlugin extends PluginBase {
sendStatus();
}
@Subscribe
public void onStatusEvent(final EventAppInitialized ev) {
sendStatus();
}
@Subscribe
public void onStatusEvent(final EventRefreshOverview ev) {
//Filter events where loop is (de)activated