compile
This commit is contained in:
parent
e1337f0fb8
commit
e916290687
1 changed files with 3 additions and 2 deletions
|
@ -69,7 +69,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||||
|
|
||||||
private const val REFRESH_INTERVAL_MILLIS = 15 * 1000L // 15 seconds
|
private const val REFRESH_INTERVAL_MILLIS = 15 * 1000L // 15 seconds
|
||||||
private const val PLACEHOLDER = "-"
|
private const val PLACEHOLDER = "-"
|
||||||
private const val MAX_TIME_DEVIATION_MINUTES = 15
|
private const val MAX_TIME_DEVIATION_MINUTES = 15.toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
private var disposables: CompositeDisposable = CompositeDisposable()
|
private var disposables: CompositeDisposable = CompositeDisposable()
|
||||||
|
@ -302,7 +302,8 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||||
|
|
||||||
podInfoBinding.timeOnPod.setTextColor(
|
podInfoBinding.timeOnPod.setTextColor(
|
||||||
podStateManager.timeBehind?.let {
|
podStateManager.timeBehind?.let {
|
||||||
if (it.abs().toStandardMinutes() > MAX_TIME_DEVIATION_MINUTES) {
|
if (it.abs().toStandardMinutes().isGreaterThan(Duration.standardMinutes
|
||||||
|
(MAX_TIME_DEVIATION_MINUTES))) {
|
||||||
Color.RED
|
Color.RED
|
||||||
}else {
|
}else {
|
||||||
Color.WHITE
|
Color.WHITE
|
||||||
|
|
Loading…
Reference in a new issue