From e7578b4c8f37d610bb1554203cc3da9501bbb6e7 Mon Sep 17 00:00:00 2001 From: Philoul Date: Fri, 23 Apr 2021 00:31:40 +0200 Subject: [PATCH] Loop Dialog, hide loop buttons if pump disconnected or loop suspended --- .../main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt | 1 + app/src/main/res/layout/dialog_loop.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt index 9b10142c8c..e412998cd4 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt @@ -195,6 +195,7 @@ class LoopDialog : DaggerDialogFragment() { binding.overviewDisconnectButtons.visibility = View.GONE binding.overviewReconnect.visibility = View.VISIBLE } + binding.overviewLoop.visibility = (!loopPlugin.isSuspended && !loopPlugin.isDisconnected).toVisibility() } val profile = profileFunction.getProfile() val profileStore = activePlugin.activeProfileInterface.profile diff --git a/app/src/main/res/layout/dialog_loop.xml b/app/src/main/res/layout/dialog_loop.xml index b0658e56e1..594d1855e3 100644 --- a/app/src/main/res/layout/dialog_loop.xml +++ b/app/src/main/res/layout/dialog_loop.xml @@ -51,6 +51,7 @@