Like in overview tab: Show smoothed bg value

This commit is contained in:
swissalpine 2023-10-30 23:31:40 +01:00 committed by GitHub
parent 9700ccd5a0
commit 0845f082b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)