1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

Show signature users

This commit is contained in:
M66B 2020-02-04 12:25:13 +01:00
parent acb44a6f71
commit 690b5c5dc8
2 changed files with 16 additions and 5 deletions

View file

@ -4777,11 +4777,20 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
int sresult = (sigResult == null ? RESULT_NO_SIGNATURE : sigResult.getResult());
if (sresult == RESULT_NO_SIGNATURE)
Snackbar.make(view, R.string.title_signature_none, Snackbar.LENGTH_LONG).show();
else if (sresult == RESULT_VALID_KEY_CONFIRMED)
Snackbar.make(view, R.string.title_signature_valid, Snackbar.LENGTH_LONG).show();
else if (sresult == RESULT_VALID_KEY_UNCONFIRMED)
Snackbar.make(view, R.string.title_signature_unconfirmed, Snackbar.LENGTH_LONG).show();
else
else if (sresult == RESULT_VALID_KEY_CONFIRMED || sresult == RESULT_VALID_KEY_UNCONFIRMED) {
List<String> users = sigResult.getConfirmedUserIds();
String text;
if (users.size() > 0)
text = getString(sresult == RESULT_VALID_KEY_UNCONFIRMED
? R.string.title_signature_unconfirmed_from
: R.string.title_signature_valid_from,
TextUtils.join(", ", users));
else
text = getString(sresult == RESULT_VALID_KEY_UNCONFIRMED
? R.string.title_signature_unconfirmed
: R.string.title_signature_valid);
Snackbar.make(view, text, Snackbar.LENGTH_LONG).show();
} else
Snackbar.make(view, R.string.title_signature_invalid, Snackbar.LENGTH_LONG).show();
break;

View file

@ -802,7 +802,9 @@
<string name="title_signature_none">Message not signed</string>
<string name="title_signature_valid">Message signature valid</string>
<string name="title_signature_valid_from">Message signature valid: %1$s</string>
<string name="title_signature_unconfirmed">Message signature valid but not confirmed</string>
<string name="title_signature_unconfirmed_from">Message signature valid but not confirmed: %1$s</string>
<string name="title_signature_invalid">Message signature invalid</string>
<string name="title_signature_invalid_reason">Message signature invalid: %1$s</string>
<string name="title_signature_certificate_invalid">Certificate chain invalid</string>