mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 09:42:17 -05:00
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...
This commit is contained in:
parent
a85bba0010
commit
3bea5b25cd
@ -786,8 +786,32 @@ public abstract class XmppActivity extends Activity {
|
|||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
account.getAxolotlService().purgeKey(fingerprint);
|
Builder builder = new Builder(XmppActivity.this);
|
||||||
refreshUi();
|
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();
|
builder.create().show();
|
||||||
|
@ -408,6 +408,8 @@
|
|||||||
<string name="purge_key">Purge key</string>
|
<string name="purge_key">Purge key</string>
|
||||||
<string name="purge_key_desc_part1">Are you sure you want to purge this key?</string>
|
<string name="purge_key_desc_part1">Are you sure you want to purge this key?</string>
|
||||||
<string name="purge_key_desc_part2">It will irreversibly be considered compromised, and you can never build a session with it again.</string>
|
<string name="purge_key_desc_part2">It will irreversibly be considered compromised, and you can never build a session with it again.</string>
|
||||||
|
<string name="purge_key_warning">Did you press purge because you are trying to fix some problem? If so, please cancel. This functionality will NOT fix your problem.</string>
|
||||||
|
<string name="purge_key_warning2">Are you sure? You CAN NOT undo this. You have been warned.</string>
|
||||||
<string name="error_no_keys_to_trust">There are no usable keys available for this contact. If you have purged any of their keys, they need to generate new ones.</string>
|
<string name="error_no_keys_to_trust">There are no usable keys available for this contact. If you have purged any of their keys, they need to generate new ones.</string>
|
||||||
<string name="error_trustkeys_title">Error</string>
|
<string name="error_trustkeys_title">Error</string>
|
||||||
<string name="fetching_history_from_server">Fetching history from server</string>
|
<string name="fetching_history_from_server">Fetching history from server</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user