ktlintFormat
This commit is contained in:
parent
c989c6a1c5
commit
8e64ca134f
5 changed files with 19 additions and 18 deletions
|
@ -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}"
|
||||
)
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class OmnipodDashBleManagerImpl @Inject constructor(
|
|||
}
|
||||
|
||||
override fun getStatus(): ConnectionState {
|
||||
return connection?.let{ getStatus() }
|
||||
return connection?.let { getStatus() }
|
||||
?: NotConnected
|
||||
}
|
||||
|
||||
|
|
|
@ -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]!!
|
||||
|
|
|
@ -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
|
||||
|
@ -221,7 +219,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
updateQueueStatus()
|
||||
}
|
||||
|
||||
private fun updateBluetoothStatus(){
|
||||
private fun updateBluetoothStatus() {
|
||||
bluetoothStatusBinding.omnipodDashBluetoothAddress.text = podStateManager.bluetoothAddress
|
||||
?: PLACEHOLDER
|
||||
bluetoothStatusBinding.omnipodDashBluetoothStatus.text =
|
||||
|
@ -392,7 +390,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
resourceHelper.gs(R.string.omnipod_common_pod_status_suspended)
|
||||
} else {
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_running) +
|
||||
podStateManager.deliveryStatus?.let{ " " + podStateManager.deliveryStatus.toString() }
|
||||
podStateManager.deliveryStatus?.let { " " + podStateManager.deliveryStatus.toString() }
|
||||
}
|
||||
// TODO
|
||||
/*
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue