From 90b101e77fa40a34cb39334f1206ca7792fe7b77 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 12:45:18 +0200 Subject: [PATCH] Overview: process buttons on pump change --- .../aaps/plugins/main/general/overview/OverviewFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 8f5f834e1f..e89a4e5450 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -56,6 +56,7 @@ import app.aaps.core.interfaces.rx.events.EventAcceptOpenLoopChange import app.aaps.core.interfaces.rx.events.EventBucketedDataCreated import app.aaps.core.interfaces.rx.events.EventEffectiveProfileSwitchChanged import app.aaps.core.interfaces.rx.events.EventExtendedBolusChange +import app.aaps.core.interfaces.rx.events.EventInitializationChanged import app.aaps.core.interfaces.rx.events.EventMobileToWear import app.aaps.core.interfaces.rx.events.EventNewOpenLoopNotification import app.aaps.core.interfaces.rx.events.EventPreferenceChange @@ -308,6 +309,10 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList overviewData.pumpStatus = it.getStatus(requireContext()) updatePumpStatus() }, fabricPrivacy::logException) + disposable += rxBus + .toObservable(EventInitializationChanged::class.java) + .observeOn(aapsSchedulers.main) + .subscribe({ processButtonsVisibility() }, fabricPrivacy::logException) disposable += rxBus .toObservable(EventEffectiveProfileSwitchChanged::class.java) .observeOn(aapsSchedulers.io)