aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2016-01-12 09:32:22 +0100
committerAndreas Straub <andy@strb.org>2016-01-12 09:33:54 +0100
commit3bea5b25cd5496cd3f14a66c208b34d0c8e48b03 (patch)
treeeee4fa90661803527744683fd0834daa698a2c5e /src/main/java/eu
parenta85bba0010e177782fa1dadaeefff29902904d43 (diff)
Add additional warnings to OMEMO purge key function
People continue to press the "don't press this" button. Maybe adding some warnings indicating that this button will not fix their problems will help...
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index 36e82b2a..a9d2bc85 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -786,8 +786,32 @@ public abstract class XmppActivity extends Activity {
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- account.getAxolotlService().purgeKey(fingerprint);
- refreshUi();
+ Builder builder = new Builder(XmppActivity.this);
+ builder.setTitle(getString(R.string.purge_key));
+ builder.setIconAttribute(android.R.attr.alertDialogIcon);
+ builder.setMessage(getString(R.string.purge_key_warning));
+ builder.setNegativeButton(getString(R.string.cancel), null);
+ builder.setPositiveButton(getString(R.string.accept),
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Builder builder = new Builder(XmppActivity.this);
+ builder.setTitle(getString(R.string.purge_key));
+ builder.setIconAttribute(android.R.attr.alertDialogIcon);
+ builder.setMessage(getString(R.string.purge_key_warning2));
+ builder.setNegativeButton(getString(R.string.cancel), null);
+ builder.setPositiveButton(getString(R.string.accept),
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ account.getAxolotlService().purgeKey(fingerprint);
+ refreshUi();
+ }
+ });
+ builder.create().show();
+ }
+ });
+ builder.create().show();
}
});
builder.create().show();