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-16 17:54:12 +02:00 committed by Jason A. Donenfeld
parent a62bd28e1f
commit 826083adf6
4 changed files with 5 additions and 5 deletions

View File

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

View File

@ -66,7 +66,7 @@
<string name="dark_theme_summary_on">Stai usando il tema scuro (notte)</string>
<string name="dark_theme_title">Usa tema scuro</string>
<string name="delete">Elimina</string>
<string name="deselect_all">Deseleziona tutto</string>
<string name="toggle_all">Inverti tutto</string>
<string name="dns_servers">Server DNS</string>
<string name="edit">Modifica</string>
<string name="endpoint">Endpoint</string>

View File

@ -66,7 +66,7 @@
<string name="dark_theme_summary_on">В данный момент используется темная (ночная) тема</string>
<string name="dark_theme_title">Использовать темную тему</string>
<string name="delete">Удалить</string>
<string name="deselect_all">Снять выделенное</string>
<string name="toggle_all">Инвертировать все</string>
<string name="dns_servers">DNS-серверы</string>
<string name="edit">Редактировать</string>
<string name="endpoint">Конечная точка</string>

View File

@ -66,7 +66,7 @@
<string name="dark_theme_summary_on">Currently using dark (night) theme</string>
<string name="dark_theme_title">Use dark theme</string>
<string name="delete">Delete</string>
<string name="deselect_all">Deselect All</string>
<string name="toggle_all">Toggle All</string>
<string name="dns_servers">DNS servers</string>
<string name="edit">Edit</string>
<string name="endpoint">Endpoint</string>