ktlintFormat

This commit is contained in:
Andrei Vereha 2021-05-31 00:01:54 +02:00
parent c989c6a1c5
commit 8e64ca134f
5 changed files with 19 additions and 18 deletions

View file

@ -408,7 +408,8 @@ class OmnipodDashPumpPlugin @Inject constructor(
}
else ->
aapsLogger.warn(LTag.PUMP,
aapsLogger.warn(
LTag.PUMP,
"Will not sync confirmed command of type: $historyEntry and " +
"succes: ${confirmation.success}"
)

View file

@ -700,7 +700,7 @@ class OmnipodDashManagerImpl @Inject constructor(
inner class ErrorInterceptor : Consumer<Throwable> {
override fun accept(throwable: Throwable) {
logger.debug(LTag.PUMP, "Intercepted error in OmnipodDashManagerImpl: ${throwable}")
logger.debug(LTag.PUMP, "Intercepted error in OmnipodDashManagerImpl: $throwable")
}
}

View file

@ -106,7 +106,6 @@ class Connection(
}
podState.bluetoothConnectionState = OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTED
val discoverer = ServiceDiscoverer(aapsLogger, gattConnection, bleCommCallbacks)
val discovered = discoverer.discoverServices()
dataBleIO.characteristic = discovered[CharacteristicType.DATA]!!

View file

@ -42,7 +42,6 @@ import info.nightscout.androidaps.utils.ui.UIRunnable
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign
import org.apache.commons.lang3.StringUtils
import org.joda.time.DateTime
import org.joda.time.Duration
import java.util.*
import javax.inject.Inject
@ -62,7 +61,6 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
@Inject lateinit var aapsSchedulers: AapsSchedulers
@Inject lateinit var pumpSync: PumpSync
companion object {
private const val REFRESH_INTERVAL_MILLIS = 15 * 1000L // 15 seconds
@ -601,8 +599,10 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
seconds < 24 * 60 * 60 -> { // < 1 day
val minutesLeft = minutes % 60
if (minutesLeft > 0)
return resourceHelper.gs(R.string.omnipod_common_time_ago,
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours), resourceHelper.gq(R.plurals.omnipod_common_minutes, minutesLeft, minutesLeft)))
return resourceHelper.gs(
R.string.omnipod_common_time_ago,
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours), resourceHelper.gq(R.plurals.omnipod_common_minutes, minutesLeft, minutesLeft))
)
return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours))
}
@ -610,12 +610,13 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
val days = hours / 24
val hoursLeft = hours % 24
if (hoursLeft > 0)
return resourceHelper.gs(R.string.omnipod_common_time_ago,
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_days, days, days), resourceHelper.gq(R.plurals.omnipod_common_hours, hoursLeft, hoursLeft)))
return resourceHelper.gs(
R.string.omnipod_common_time_ago,
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_days, days, days), resourceHelper.gq(R.plurals.omnipod_common_hours, hoursLeft, hoursLeft))
)
return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_days, days, days))
}
}
}
private fun isQueueEmpty(): Boolean {