This commit is contained in:
Milos Kozak 2023-10-31 09:17:31 +01:00
commit 6c604e923f

View file

@ -132,7 +132,7 @@ class Widget : AppWidgetProvider() {
private fun updateBg(views: RemoteViews) {
views.setTextViewText(
R.id.bg,
overviewData.lastBg(iobCobCalculator.ads)?.let { profileUtil.fromMgdlToStringInUnits(it.value) } ?: rh.gs(app.aaps.core.ui.R.string.value_unavailable_short))
overviewData.lastBg(iobCobCalculator.ads)?.let { profileUtil.fromMgdlToStringInUnits(it.recalculated) } ?: rh.gs(app.aaps.core.ui.R.string.value_unavailable_short))
views.setTextColor(
R.id.bg, when {
overviewData.isLow(iobCobCalculator.ads) -> rh.gc(app.aaps.core.ui.R.color.widget_low)
@ -285,4 +285,4 @@ class Widget : AppWidgetProvider() {
} else views.setViewVisibility(R.id.variable_sensitivity, View.GONE)
} else views.setViewVisibility(R.id.variable_sensitivity, View.GONE)
}
}
}