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) {
|
if (isValid) {
|
||||||
invalidProfile.setVisibility(View.GONE); //show invalid profile
|
invalidProfile.setVisibility(View.GONE); //show invalid profile
|
||||||
|
|
||||||
if (isEdited || !ConfigBuilderPlugin.getActivePump().isInitialized() || ConfigBuilderPlugin.getActivePump().isSuspended()) {
|
if (isEdited) {
|
||||||
//edited profile -> save first
|
//edited profile -> save first
|
||||||
//pump not initialized -> don't update profile yet
|
|
||||||
profileswitchButton.setVisibility(View.GONE);
|
profileswitchButton.setVisibility(View.GONE);
|
||||||
} else {
|
|
||||||
profileswitchButton.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isEdited){
|
|
||||||
saveButton.setVisibility(View.VISIBLE);
|
saveButton.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
profileswitchButton.setVisibility(View.VISIBLE);
|
||||||
saveButton.setVisibility(View.GONE);
|
saveButton.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
invalidProfile.setVisibility(View.VISIBLE);
|
invalidProfile.setVisibility(View.VISIBLE);
|
||||||
profileswitchButton.setVisibility(View.GONE);
|
profileswitchButton.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in a new issue