fix warning

This commit is contained in:
Milos Kozak 2022-08-04 10:32:00 +02:00
parent 7ae066dde2
commit c5425196f1

View file

@ -358,7 +358,7 @@ class MedtronicHistoryData @Inject constructor(
aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "ProcessHistoryData: TBRs Processed [count=%d, items=%s]", tbrs.size, gson.toJson(tbrs)))
if (tbrs.isNotEmpty()) {
try {
processTBREntries(tbrs, rewindRecords)
processTBREntries(tbrs)
} catch (ex: Exception) {
aapsLogger.error(LTag.PUMP, "ProcessHistoryData: Error processing TBR entries: " + ex.message, ex)
throw ex
@ -583,7 +583,7 @@ class MedtronicHistoryData @Inject constructor(
}
}
private fun processTBREntries(entryList: MutableList<PumpHistoryEntry>, rewindList: MutableList<PumpHistoryEntry>) {
private fun processTBREntries(entryList: MutableList<PumpHistoryEntry>) {
entryList.reverse()
val tbr = entryList[0].getDecodedDataEntry("Object") as TempBasalPair
// var readOldItem = false
@ -607,7 +607,7 @@ class MedtronicHistoryData @Inject constructor(
val tbrRecords = pumpSyncStorage.getTBRs()
val processList: MutableList<TempBasalProcessDTO> = createTBRProcessList(entryList, rewindList)
val processList: MutableList<TempBasalProcessDTO> = createTBRProcessList(entryList)
if (processList.isNotEmpty()) {
for (tempBasalProcessDTO in processList) {
@ -731,7 +731,7 @@ class MedtronicHistoryData @Inject constructor(
}
fun createTBRProcessList(entryList: MutableList<PumpHistoryEntry>, rewindList: MutableList<PumpHistoryEntry>) : MutableList<TempBasalProcessDTO> {
fun createTBRProcessList(entryList: MutableList<PumpHistoryEntry>) : MutableList<TempBasalProcessDTO> {
aapsLogger.debug(LTag.PUMP, "${ProcessHistoryRecord.TBR.description} List (before filter): ${gson.toJson(entryList)}")