From a3421316acdeb582582aaa3383754dd7b228e3a3 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 2 May 2018 21:38:45 +0200 Subject: [PATCH] Allow ProfileSwitch before pump is connected. https://github.com/MilosKozak/AndroidAPS/issues/969 --- .../plugins/ProfileLocal/LocalProfileFragment.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java index e6ed71f3d3..6c22a2e9ce 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileLocal/LocalProfileFragment.java @@ -199,22 +199,14 @@ public class LocalProfileFragment extends SubscriberFragment { if (isValid) { invalidProfile.setVisibility(View.GONE); //show invalid profile - if (isEdited || !ConfigBuilderPlugin.getActivePump().isInitialized() || ConfigBuilderPlugin.getActivePump().isSuspended()) { + if (isEdited) { //edited profile -> save first - //pump not initialized -> don't update profile yet profileswitchButton.setVisibility(View.GONE); - } else { - profileswitchButton.setVisibility(View.VISIBLE); - } - - if(isEdited){ saveButton.setVisibility(View.VISIBLE); } else { + profileswitchButton.setVisibility(View.VISIBLE); saveButton.setVisibility(View.GONE); - } - - } else { invalidProfile.setVisibility(View.VISIBLE); profileswitchButton.setVisibility(View.GONE);