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)