From 48801a3b503da8cb3c6d1b9e29f4335a5fbf9264 Mon Sep 17 00:00:00 2001 From: Jakob Nixdorf Date: Mon, 11 Dec 2017 11:26:37 +0100 Subject: [PATCH] Add the label to the removal confirmation dialog Closes #84 --- .../org/shadowice/flocke/andotp/View/EntriesCardAdapter.java | 5 ++++- app/src/main/res/values/strings_main.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java index 8a42d1a9..e7ccda64 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java @@ -454,8 +454,11 @@ public class EntriesCardAdapter extends RecyclerView.Adapter public void removeItem(final int pos) { AlertDialog.Builder builder = new AlertDialog.Builder(context); + String label = displayedEntries.get(pos).getLabel(); + String message = context.getString(R.string.dialog_msg_confirm_delete, label); + builder.setTitle(R.string.dialog_title_remove) - .setMessage(R.string.dialog_msg_confirm_delete) + .setMessage(message) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { diff --git a/app/src/main/res/values/strings_main.xml b/app/src/main/res/values/strings_main.xml index b79f041a..6a6a2a29 100644 --- a/app/src/main/res/values/strings_main.xml +++ b/app/src/main/res/values/strings_main.xml @@ -65,7 +65,7 @@ Last used Please enter your device credentials to start andOTP. - Are you sure you want do remove this account? + Are you sure you want do remove the account \"%1$s\"? To keep your account information secure this app only stores it encrypted. Part of the encryption key used for this is stored in the Android