mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Send dialog: check for OpenKeychain
This commit is contained in:
parent
4e7e299d85
commit
7df83464b9
1 changed files with 16 additions and 15 deletions
|
@ -342,10 +342,13 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|||
spEncrypt.setTag(position);
|
||||
setEncrypt(encryptValues[position]);
|
||||
|
||||
tvEncrypt.setPaintFlags(tvEncrypt.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvEncrypt.setOnClickListener(null);
|
||||
|
||||
if ((encryptValues[position] == EntityMessage.PGP_SIGNONLY ||
|
||||
encryptValues[position] == EntityMessage.PGP_ENCRYPTONLY ||
|
||||
encryptValues[position] == EntityMessage.PGP_SIGNENCRYPT) &&
|
||||
PgpHelper.isOpenKeychainInstalled(context)) {
|
||||
encryptValues[position] == EntityMessage.PGP_SIGNENCRYPT))
|
||||
if (PgpHelper.isOpenKeychainInstalled(context)) {
|
||||
tvEncrypt.setPaintFlags(tvEncrypt.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvEncrypt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -355,10 +358,8 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|||
v.getContext().startActivity(pm.getLaunchIntentForPackage(pkg));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
tvEncrypt.setPaintFlags(tvEncrypt.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvEncrypt.setOnClickListener(null);
|
||||
}
|
||||
} else
|
||||
ToastEx.makeText(context, R.string.title_no_openpgp, ToastEx.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue