From 513007f6ae3251e58b0f4bbdc412fcbc2abc4207 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Sun, 4 Apr 2021 17:15:44 +0200 Subject: [PATCH] dash: undo the temporary discardButtonEnabled test --- .../plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt index 27f93766f6..1bf1813d96 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt @@ -117,7 +117,9 @@ class DashPodManagementActivity : NoSplashAppCompatActivity() { // Only show the discard button to reset a cached unique ID before the unique ID has actually been set // Otherwise, users should use the Deactivate Pod Wizard. In case proper deactivation fails, // they will get an option to discard the Pod there - val discardButtonEnabled = true + val discardButtonEnabled = + podStateManager.uniqueId != null && + podStateManager.activationProgress.isBefore(ActivationProgress.SET_UNIQUE_ID) binding.buttonDiscardPod.visibility = discardButtonEnabled.toVisibility() binding.buttonActivatePod.isEnabled = podStateManager.activationProgress.isBefore(ActivationProgress.COMPLETED)