summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorSébastien LEBEAU <sebcbi1@gmail.com>2020-02-16 17:54:12 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-02-23 10:11:12 +0100
commit826083adf63f514d8d90fe820c74a1f1c86d6dc6 (patch)
tree79ce24f6e7e4aade69ad71fcb12841aaeb64a89e /app/src/main/java/com/wireguard
parenta62bd28e1f53c10eb11570ccf5dfccec8d479a1e (diff)
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>
Diffstat (limited to 'app/src/main/java/com/wireguard')
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
index 67059c73..c513d47f 100644
--- a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
@@ -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;
}