From e6fae87abfa420f726f2a98b21d43d8ed131be5e Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 1 Aug 2018 14:46:19 +0200 Subject: [PATCH] use EventAppInitialized in xdrip status line --- .../plugins/XDripStatusline/StatuslinePlugin.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java index bc879bc2a7..6e2894b4e4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java @@ -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