show the deactive button if ltk!=null

This commit is contained in:
Andrei Vereha 2021-12-01 00:06:21 +01:00
parent 9d1267e90d
commit 953c900e28

View file

@ -127,7 +127,7 @@ class DashPodManagementActivity : NoSplashAppCompatActivity() {
binding.buttonDiscardPod.visibility = discardButtonEnabled.toVisibility() binding.buttonDiscardPod.visibility = discardButtonEnabled.toVisibility()
binding.buttonActivatePod.isEnabled = podStateManager.activationProgress.isBefore(ActivationProgress.COMPLETED) binding.buttonActivatePod.isEnabled = podStateManager.activationProgress.isBefore(ActivationProgress.COMPLETED)
binding.buttonDeactivatePod.isEnabled = podStateManager.bluetoothAddress != null binding.buttonDeactivatePod.isEnabled = podStateManager.bluetoothAddress != null || podStateManager.ltk != null
if (podStateManager.activationProgress.isAtLeast(ActivationProgress.PHASE_1_COMPLETED)) { if (podStateManager.activationProgress.isAtLeast(ActivationProgress.PHASE_1_COMPLETED)) {
if (commandQueue.isCustomCommandInQueue(CommandPlayTestBeep::class.java)) { if (commandQueue.isCustomCommandInQueue(CommandPlayTestBeep::class.java)) {