diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index 81662f3ce5..b12cc3ed1c 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -758,9 +758,7 @@ class MedtronicHistoryData @Inject constructor( var proposedTime = DateTimeUtil.toMillisFromATD(treatment!!.atechDateTime!!) // pumpTime should never be null, but it can theoretically happen if reading of time from pump fails - if (this.pumpTime!=null) { - proposedTime += (this.pumpTime!!.timeDifference * 1000) - } + this.pumpTime?.let { proposedTime += (it.timeDifference * 1000) } val proposedTimeDiff : LongArray = longArrayOf(proposedTime-(2*60*1000), proposedTime+(2L*60L*1000L)) val tempEntriesList: MutableList = mutableListOf()