Merge pull request #2169 from yodax/nsclient_autosens

Show correct icon when AutoSens data is available under AAPSClient
This commit is contained in:
Milos Kozak 2022-11-08 09:27:56 +01:00 committed by GitHub
commit 7e7399757a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1104,7 +1104,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
private fun updateSensitivity() {
_binding ?: return
if (constraintChecker.isAutosensModeEnabled().value()) {
if (constraintChecker.isAutosensModeEnabled().value() || !(config.NSCLIENT && overviewData.lastAutosensData(iobCobCalculator) == null)) {
binding.infoLayout.sensitivityIcon.setImageResource(R.drawable.ic_swap_vert_black_48dp_green)
} else {
binding.infoLayout.sensitivityIcon.setImageResource(R.drawable.ic_x_swap_vert)