Format test for displaying existing wipers

This commit is contained in:
ameba23
2021-05-17 12:17:28 +02:00
parent ff493273c1
commit 60065fe38f
4 changed files with 9 additions and 6 deletions

View File

@@ -43,12 +43,15 @@ public class RemoteWipeDisplayFragment extends
View view = inflater.inflate(R.layout.fragment_display_remote_wipe,
container, false);
List<String> 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;

View File

@@ -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());
}

View File

@@ -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"

View File

@@ -743,5 +743,6 @@
<string name="remote_wipe_setup_received">You have been added a remote wiper.</string>
<string name="remote_wipe_setup_sent">You have added this contact as a remote wiper.</string>
<string name="activity_name_remote_wipe">Remote Wipe</string>
<string name="assigned_wipers">Your assigned trusted wipers</string>
</resources>