diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java index 1a1f74b645..b35704f176 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java @@ -156,7 +156,6 @@ public class DanaRSService extends Service { loadEvents(); - danaRPump.lastConnection = now; MainApp.bus().post(new EventDanaRNewStatus()); MainApp.bus().post(new EventInitializationChanged()); NSUpload.uploadDeviceStatus(); @@ -190,6 +189,7 @@ public class DanaRSService extends Service { else lastHistoryFetched = 0; log.debug("Events loaded"); + danaRPump.lastConnection = System.currentTimeMillis(); return new PumpEnactResult().success(true); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java index 81b5837511..943054d4a2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java @@ -209,7 +209,6 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService { loadEvents(); - mDanaRPump.lastConnection = now; MainApp.bus().post(new EventDanaRNewStatus()); MainApp.bus().post(new EventInitializationChanged()); NSUpload.uploadDeviceStatus(); @@ -413,6 +412,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService { lastHistoryFetched = MsgHistoryEvents_v2.lastEventTimeLoaded - 45 * 60 * 1000L; //always load last 45 min; else lastHistoryFetched = 0; + mDanaRPump.lastConnection = System.currentTimeMillis(); return new PumpEnactResult().success(true); }