diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index c9f54e1aaf..c5b505a3d3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1189,6 +1189,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con } private void processCannulaFilledEvent(CannulaFilledEvent event) { + if (!SP.getBoolean("insight_log_site_changes", false)) return; long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(), event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset; uploadCareportalEvent(timestamp, CareportalEvent.SITECHANGE); @@ -1216,7 +1217,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con } private void processSniffingDoneEvent(SniffingDoneEvent event) { - if (!SP.getBoolean("insight_log_site_changes", false)) return; + if (!SP.getBoolean("insight_log_reservoir_changes", false)) return; long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(), event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset; uploadCareportalEvent(timestamp, CareportalEvent.INSULINCHANGE); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0414d78515..576e599845 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1253,6 +1253,7 @@ Mute Pump alert Log site changes + Log reservoir changes Log tube changes Log battery changes Log operating mode changes diff --git a/app/src/main/res/xml/pref_insight_local.xml b/app/src/main/res/xml/pref_insight_local.xml index 4cb9fa6d18..02c4ce752b 100644 --- a/app/src/main/res/xml/pref_insight_local.xml +++ b/app/src/main/res/xml/pref_insight_local.xml @@ -10,14 +10,19 @@ + android:key="insight_log_reservoir_changes" + android:title="@string/log_reservoir_changes" /> + +