Merge pull request #979 from MilosKozak/lp-ps-always
LP: Allow ProfileSwitch before pump is connected.
This commit is contained in:
commit
f9bbb72831
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()) {
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue