diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java index c500b55b..f4e09e62 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java @@ -171,11 +171,16 @@ public class EipFragment extends Fragment implements Observer { } restoreFromSavedInstance(savedInstanceState); - locationButton.setOnClickListener(v -> { + if (provider != null && provider.hasGatewaysInDifferentLocations()) { + locationButton.setOnClickListener(v -> { FragmentManagerEnhanced fragmentManager = new FragmentManagerEnhanced(getActivity().getSupportFragmentManager()); Fragment fragment = new GatewaySelectionFragment(); fragmentManager.replace(R.id.main_container, fragment, MainActivity.TAG); - }); + }); + locationButton.setEnabled(true); + } else { + locationButton.setEnabled(false); + } mainButton.setOnClickListener(v -> { handleIcon(); |