From 60065fe38f8c02bc1afbf9a2d052fd6b03caf43e Mon Sep 17 00:00:00 2001 From: ameba23 Date: Mon, 17 May 2021 12:17:28 +0200 Subject: [PATCH] Format test for displaying existing wipers --- .../android/remotewipe/RemoteWipeDisplayFragment.java | 9 ++++++--- .../android/remotewipe/RemoteWipeSetupActivity.java | 2 +- .../src/main/res/layout/fragment_display_remote_wipe.xml | 3 +-- briar-android/src/main/res/values/strings.xml | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeDisplayFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeDisplayFragment.java index f4ece51de..e07d88859 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeDisplayFragment.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeDisplayFragment.java @@ -43,12 +43,15 @@ public class RemoteWipeDisplayFragment extends View view = inflater.inflate(R.layout.fragment_display_remote_wipe, container, false); List wiperNames = viewModel.getWiperNames(); - String custodianNamesString = ""; + StringBuilder custodianNamesString = new StringBuilder(); for (String custodianName : wiperNames) { - custodianNamesString += custodianName + ", "; + custodianNamesString + .append("• ") + .append(custodianName) + .append("\n"); } TextView textViewThreshold = view.findViewById(R.id.textViewWipers); - textViewThreshold.setText(custodianNamesString); + textViewThreshold.setText(custodianNamesString.toString()); // Button button = view.findViewById(R.id.button); // button.setOnClickListener(e -> viewModel.onErrorTryAgain()); return view; diff --git a/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeSetupActivity.java b/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeSetupActivity.java index d0b86b316..f91009073 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeSetupActivity.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/remotewipe/RemoteWipeSetupActivity.java @@ -39,7 +39,7 @@ public class RemoteWipeSetupActivity extends BriarActivity implements super.onCreate(savedInstanceState); setContentView(R.layout.activity_distributed_backup); if (viewModel.remoteWipeIsSetup()) { -// showInitialFragment(); + showInitialFragment(new RemoteWipeDisplayFragment()); } else { showInitialFragment(WiperSelectorFragment.newInstance()); } diff --git a/briar-android/src/main/res/layout/fragment_display_remote_wipe.xml b/briar-android/src/main/res/layout/fragment_display_remote_wipe.xml index 5ad3e0bd7..97fa36d31 100644 --- a/briar-android/src/main/res/layout/fragment_display_remote_wipe.xml +++ b/briar-android/src/main/res/layout/fragment_display_remote_wipe.xml @@ -16,7 +16,7 @@ android:layout_height="match_parent"> android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" - android:text="placeholder threshold" + android:text="@string/assigned_wipers" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -27,7 +27,6 @@ android:layout_height="match_parent"> android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" - android:text="@string/backup_done_info" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/briar-android/src/main/res/values/strings.xml b/briar-android/src/main/res/values/strings.xml index 311c7f321..89f59217d 100644 --- a/briar-android/src/main/res/values/strings.xml +++ b/briar-android/src/main/res/values/strings.xml @@ -743,5 +743,6 @@ You have been added a remote wiper. You have added this contact as a remote wiper. Remote Wipe + Your assigned trusted wipers