Allow ProfileSwitch before pump is connected.

https://github.com/MilosKozak/AndroidAPS/issues/969
This commit is contained in:
AdrianLxM 2018-05-02 21:38:45 +02:00 committed by GitHub
parent d0e6a2258f
commit a3421316ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);