Fix displaying value

This commit is contained in:
Milos Kozak 2023-10-28 12:50:25 +02:00
parent 1f9f112f68
commit 4b8c48b424

View file

@ -793,7 +793,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
val lastBgDescription = overviewData.lastBgDescription(iobCobCalculator.ads) val lastBgDescription = overviewData.lastBgDescription(iobCobCalculator.ads)
runOnUiThread { runOnUiThread {
_binding ?: return@runOnUiThread _binding ?: return@runOnUiThread
binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.smoothed) binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.recalculated)
binding.infoLayout.bg.setTextColor(lastBgColor) binding.infoLayout.bg.setTextColor(lastBgColor)
trendArrow?.let { binding.infoLayout.arrow.setImageResource(it.directionToIcon()) } trendArrow?.let { binding.infoLayout.arrow.setImageResource(it.directionToIcon()) }
binding.infoLayout.arrow.visibility = (trendArrow != null).toVisibilityKeepSpace() binding.infoLayout.arrow.visibility = (trendArrow != null).toVisibilityKeepSpace()