AppListDialogFragment: change "Deselect All" to "Toggle All"

Change functionality in excluded apps dialog for better user experience
when user wants only one or few apps to use WireGuard.

Signed-off-by: Sébastien LEBEAU <sebcbi1@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Sébastien LEBEAU
2020-02-23 10:11:12 +01:00
committed by Jason A. Donenfeld
parent a62bd28e1f
commit 826083adf6
4 changed files with 5 additions and 5 deletions
@@ -98,7 +98,7 @@ public class AppListDialogFragment extends DialogFragment {
alertDialogBuilder.setPositiveButton(R.string.set_exclusions, (dialog, which) -> setExclusionsAndDismiss());
alertDialogBuilder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
alertDialogBuilder.setNeutralButton(R.string.deselect_all, (dialog, which) -> {
alertDialogBuilder.setNeutralButton(R.string.toggle_all, (dialog, which) -> {
});
binding.setFragment(this);
@@ -109,7 +109,7 @@ public class AppListDialogFragment extends DialogFragment {
final AlertDialog dialog = alertDialogBuilder.create();
dialog.setOnShowListener(d -> dialog.getButton(DialogInterface.BUTTON_NEUTRAL).setOnClickListener(view -> {
for (final ApplicationData app : appData)
app.setExcludedFromTunnel(false);
app.setExcludedFromTunnel(!app.isExcludedFromTunnel());
}));
return dialog;
}