expiry: color yellow 4h before expiration
do not display lot number and unique id
This commit is contained in:
parent
69a5d46be6
commit
274a94d1f3
2 changed files with 12 additions and 4 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<!-- Unique ID -->
|
<!-- Unique ID -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/omnipod_common_overview_pod_unique_id_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
|
|
||||||
<!-- Pod Lot -->
|
<!-- Pod Lot -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/omnipod_common_overview_lot_number_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
|
@ -173,6 +173,8 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||||
bluetoothStatusBinding.deliveryStatus.visibility = View.VISIBLE
|
bluetoothStatusBinding.deliveryStatus.visibility = View.VISIBLE
|
||||||
bluetoothStatusBinding.connectionQuality.visibility = View.VISIBLE
|
bluetoothStatusBinding.connectionQuality.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
podInfoBinding.omnipodCommonOverviewLotNumberLayout.visibility = View.GONE
|
||||||
|
podInfoBinding.omnipodCommonOverviewPodUniqueIdLayout.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
@ -333,10 +335,14 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||||
}
|
}
|
||||||
?: PLACEHOLDER
|
?: PLACEHOLDER
|
||||||
podInfoBinding.podExpiryDate.setTextColor(
|
podInfoBinding.podExpiryDate.setTextColor(
|
||||||
if (expiresAt != null && ZonedDateTime.now().isAfter(expiresAt))
|
when {
|
||||||
Color.RED
|
expiresAt != null && ZonedDateTime.now().isAfter(expiresAt) ->
|
||||||
else
|
Color.RED
|
||||||
Color.WHITE
|
expiresAt != null && ZonedDateTime.now().isAfter(expiresAt.minusHours(4)) ->
|
||||||
|
Color.YELLOW
|
||||||
|
else ->
|
||||||
|
Color.WHITE
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
podStateManager.alarmType?.let {
|
podStateManager.alarmType?.let {
|
||||||
|
|
Loading…
Reference in a new issue