summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ProviderSelectionFragment.java3
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/viewmodel/ProviderSelectionViewModel.java12
2 files changed, 13 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ProviderSelectionFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ProviderSelectionFragment.java
index 7f80a99d..bf508e0b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ProviderSelectionFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ProviderSelectionFragment.java
@@ -58,9 +58,8 @@ public class ProviderSelectionFragment extends BaseSetupFragment implements Canc
radioButtons = new ArrayList<>();
for (int i = 0; i < viewModel.size(); i++) {
- Provider provider = viewModel.getProvider(i);
RadioButton radioButton = new RadioButton(binding.getRoot().getContext());
- radioButton.setText(provider.getDomain());
+ radioButton.setText(viewModel.getProviderName(i));
radioButton.setId(i);
binding.providerRadioGroup.addView(radioButton);
radioButtons.add(radioButton);
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/viewmodel/ProviderSelectionViewModel.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/viewmodel/ProviderSelectionViewModel.java
index e3880181..d1954ffb 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/viewmodel/ProviderSelectionViewModel.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/viewmodel/ProviderSelectionViewModel.java
@@ -78,4 +78,16 @@ public class ProviderSelectionViewModel extends ViewModel {
public void setCustomUrl(String url) {
customUrl = url;
}
+
+
+ public String getProviderName(int pos) {
+ String domain = getProvider(pos).getDomain();
+ if ("riseup.net".equals(domain)) {
+ return "Riseup";
+ }
+ if ("calyx.net".equals(domain)) {
+ return "The Calyx Institute";
+ }
+ return domain;
+ }
} \ No newline at end of file