- replaced null check with elvis op

This commit is contained in:
Andy Rozman 2021-05-20 13:09:51 +01:00
parent 369c8a5180
commit 76e6537b0f

View file

@ -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<PumpDbEntry> = mutableListOf()