From 826083adf63f514d8d90fe820c74a1f1c86d6dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20LEBEAU?= Date: Sun, 16 Feb 2020 17:54:12 +0200 Subject: [PATCH] AppListDialogFragment: change "Deselect All" to "Toggle All" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Harsh Shandilya --- .../com/wireguard/android/fragment/AppListDialogFragment.java | 4 ++-- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 5 insertions(+), 5 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; } diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 2aba5f8a..b37d7927 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -66,7 +66,7 @@ Stai usando il tema scuro (notte) Usa tema scuro Elimina - Deseleziona tutto + Inverti tutto Server DNS Modifica Endpoint diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2f2c03bd..00b96fbc 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -66,7 +66,7 @@ В данный момент используется темная (ночная) тема Использовать темную тему Удалить - Снять выделенное + Инвертировать все DNS-серверы Редактировать Конечная точка diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 336cd4ef..89a32c08 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -66,7 +66,7 @@ Currently using dark (night) theme Use dark theme Delete - Deselect All + Toggle All DNS servers Edit Endpoint