Skip to content

Commit

Permalink
Show errors in pod history in red
Browse files Browse the repository at this point in the history
  • Loading branch information
smuething committed Aug 25, 2020
1 parent 48548aa commit 02f7139
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ class OmnipodHistoryRecordViewHolder(view: View, val aapsLogger: AAPSLogger, val
type.setText(PodHistoryEntryType.getByCode(record.podEntryTypeCode).resourceId)
value.text = description(record)

if (PodHistoryEntryType.getByCode(record.podEntryTypeCode) == PodHistoryEntryType.PairAndPrime) {
layout.background.setColorFilter(Color.parseColor("#8000ff00"), PorterDuff.Mode.OVERLAY)
} else {
layout.background.colorFilter = standardBackgroundColorFilter
when {
!record.isSuccess ->
layout.background.setColorFilter(Color.parseColor("#80ff0000"), PorterDuff.Mode.OVERLAY)
PodHistoryEntryType.getByCode(record.podEntryTypeCode) == PodHistoryEntryType.PairAndPrime ->
layout.background.setColorFilter(Color.parseColor("#8000ff00"), PorterDuff.Mode.OVERLAY)
else ->
layout.background.colorFilter = standardBackgroundColorFilter
}
}
}
Expand Down

0 comments on commit 02f7139

Please sign in to comment.