Allow ProfileSwitch before pump is connected.
https://github.com/MilosKozak/AndroidAPS/issues/969
This commit is contained in:
parent
d0e6a2258f
commit
a3421316ac
1 changed files with 2 additions and 10 deletions
|
@ -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()) {
|
||||
//edited profile -> save first
|
||||
//pump not initialized -> don't update profile yet
|
||||
profileswitchButton.setVisibility(View.GONE);
|
||||
} else {
|
||||
profileswitchButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (isEdited) {
|
||||
//edited profile -> save first
|
||||
profileswitchButton.setVisibility(View.GONE);
|
||||
saveButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
profileswitchButton.setVisibility(View.VISIBLE);
|
||||
saveButton.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
invalidProfile.setVisibility(View.VISIBLE);
|
||||
profileswitchButton.setVisibility(View.GONE);
|
||||
|
|
Loading…
Reference in a new issue