From 52e343213249c0abff26aab4756b5c9edf8755c3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 11 Nov 2021 20:50:53 +0100 Subject: [PATCH] Eros: try to fix blocking UI --- .../activation/viewmodel/action/ErosInitializePodViewModel.kt | 2 +- .../activation/viewmodel/action/ErosInsertCannulaViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt index a6f3c69799..b2a76ed05e 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt @@ -27,7 +27,7 @@ class ErosInitializePodViewModel @Inject constructor( override fun isPodDeactivatable(): Boolean = podStateManager.activationProgress.isAtLeast(ActivationProgress.PAIRING_COMPLETED) - override fun doExecuteAction(): Single = Single.just(aapsOmnipodManager.initializePod()) + override fun doExecuteAction(): Single = Single.fromCallable { aapsOmnipodManager.initializePod() } @StringRes override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_initialize_pod_title diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt index b3c071b294..9c556a7fe8 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt @@ -29,7 +29,7 @@ class ErosInsertCannulaViewModel @Inject constructor( override fun isPodDeactivatable(): Boolean = podStateManager.activationProgress.isAtLeast(ActivationProgress.PAIRING_COMPLETED) - override fun doExecuteAction(): Single = Single.just(aapsOmnipodManager.insertCannula(profileFunction.getProfile())) + override fun doExecuteAction(): Single = Single.fromCallable { aapsOmnipodManager.insertCannula(profileFunction.getProfile()) } @StringRes override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_insert_cannula_title