summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-08-04 01:15:33 +0200
committercyBerta <cyberta@riseup.net>2023-08-04 01:15:33 +0200
commit84ed5d88e7d04379af5975f3a8af76ef4010d8c7 (patch)
tree18056e72e32e512bc3e5e877321155247f65a4a6 /app/src
parent96d564c358f3792929d2075c7fc3efb62ef608a7 (diff)
hard code calyx and riseup provider names ...
Diffstat (limited to 'app/src')
-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