summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorNorbel AMBANUMBEN <aanorbel@gmail.com>2024-11-27 19:05:48 +0100
committercyBerta <cyberta@riseup.net>2024-11-28 22:53:30 +0100
commit523c4dd422ab53f5dc961bca199d2cecef2c095f (patch)
tree873f58bfc874cef76c86c2a2ea53d7b85102d05d /app/src/main/java/se
parentcb302ca754324620c1f305f38b2705691772801b (diff)
update ui behaviour
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/SettingsFragment.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/SettingsFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/SettingsFragment.java
index 99d49ccb..eb777abc 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/SettingsFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/SettingsFragment.java
@@ -130,12 +130,16 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
IconTextEntry manualConfiguration = rootView.findViewById(R.id.bridge_manual_switch);
manualConfiguration.setVisibility(ProviderObservable.getInstance().getCurrentProvider().supportsPluggableTransports() ? VISIBLE : GONE);
SwitchCompat manualConfigurationSwitch = rootView.findViewById(R.id.bridge_manual_switch_control);
- manualConfigurationSwitch.setChecked(usesManualBridges());
+ boolean usesManualBridge = usesManualBridges();
+ manualConfigurationSwitch.setChecked(usesManualBridge);
manualConfigurationSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (!buttonView.isPressed()) {
return;
}
resetManualConfig();
+ if (!usesManualBridge){
+ openManualConfigurationFragment();
+ }
});
manualConfiguration.setOnClickListener((buttonView) -> openManualConfigurationFragment());
@@ -151,6 +155,7 @@ public class SettingsFragment extends Fragment implements SharedPreferences.OnSh
useSnowflake(false);
setUseTunnel(TUNNELING_NONE);
setUsePortHopping(false);
+ useBridges(false);
if (VpnStatus.isVPNActive()) {
EipCommand.startVPN(getContext(), false);
Toast.makeText(getContext(), R.string.reconnecting, Toast.LENGTH_LONG).show();