Merge pull request #2821 from Philoul/FixOverviewTBRIcon
Fix TBR icon even with 100% percent set
This commit is contained in:
commit
3174b8219e
1 changed files with 5 additions and 5 deletions
|
@ -683,10 +683,10 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
overview_basebasal?.setTextColor(activeTemp?.let { resourceHelper.gc(R.color.basal) }
|
||||
?: resourceHelper.gc(R.color.defaulttextcolor))
|
||||
|
||||
if (activeTemp != null)
|
||||
overview_basebasal_icon?.setImageResource(if (activeTemp.tempBasalConvertedToPercent(System.currentTimeMillis(), profile) > 100) R.drawable.ic_cp_basal_tbr_high else R.drawable.ic_cp_basal_tbr_low)
|
||||
else
|
||||
overview_basebasal_icon?.setImageResource(R.drawable.ic_cp_basal_no_tbr)
|
||||
val percentRate = activeTemp?.tempBasalConvertedToPercent(System.currentTimeMillis(), profile) ?:100
|
||||
if (percentRate > 100) overview_basebasal_icon?.setImageResource(R.drawable.ic_cp_basal_tbr_high)
|
||||
if (percentRate < 100) overview_basebasal_icon?.setImageResource(R.drawable.ic_cp_basal_tbr_low)
|
||||
|
||||
// Extended bolus
|
||||
val extendedBolus = treatmentsPlugin.getExtendedBolusFromHistory(System.currentTimeMillis())
|
||||
|
|
Loading…
Reference in a new issue