Merge pull request #3010 from swissalpine/patch-1
Like in overview tab: Show smoothed bg value in Widget
This commit is contained in:
commit
fec5958fd3
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ class Widget : AppWidgetProvider() {
|
||||||
private fun updateBg(views: RemoteViews) {
|
private fun updateBg(views: RemoteViews) {
|
||||||
views.setTextViewText(
|
views.setTextViewText(
|
||||||
R.id.bg,
|
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(
|
views.setTextColor(
|
||||||
R.id.bg, when {
|
R.id.bg, when {
|
||||||
overviewData.isLow(iobCobCalculator.ads) -> rh.gc(app.aaps.core.ui.R.color.widget_low)
|
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)
|
||||||
} else views.setViewVisibility(R.id.variable_sensitivity, View.GONE)
|
} else views.setViewVisibility(R.id.variable_sensitivity, View.GONE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue