diff options
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/views/SelectLocationEntry.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/SelectLocationEntry.java b/app/src/main/java/se/leap/bitmaskclient/base/views/SelectLocationEntry.java index 204e8692..2a082579 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/views/SelectLocationEntry.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/views/SelectLocationEntry.java @@ -16,6 +16,8 @@ import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.models.Location; import se.leap.bitmaskclient.eip.GatewaysManager.Load; +import static de.blinkt.openvpn.core.connection.Connection.TransportType.OBFS4; + public class SelectLocationEntry extends LinearLayout { private static final String TAG = SelectLocationEntry.class.getSimpleName(); @@ -26,8 +28,6 @@ public class SelectLocationEntry extends LinearLayout { LocationIndicator locationIndicator; View divider; - // private OnClickListener onClickListener; - public SelectLocationEntry(Context context) { super(context); initLayout(context); @@ -69,10 +69,9 @@ public class SelectLocationEntry extends LinearLayout { boolean valid = location.hasLocationInfo(); locationText.setVisibility(valid ? VISIBLE : GONE); locationIndicator.setVisibility(valid ? VISIBLE : GONE); - bridgesView.setVisibility(valid ? VISIBLE : GONE); + bridgesView.setVisibility(transportType == OBFS4 && location.supportsTransport(OBFS4) ? VISIBLE : GONE); locationText.setText(location.getName()); locationIndicator.setLoad(Load.getLoadByValue(location.getAverageLoad(transportType))); - bridgesView.setVisibility(location.supportsTransport(Connection.TransportType.OBFS4) ? VISIBLE : GONE); selectedView.setChecked(location.selected); } |