mirror of https://github.com/M66B/FairEmail.git
Link to OpenKeychain app only when relevant
This commit is contained in:
parent
388be88d0f
commit
7a6a43818d
|
@ -7759,7 +7759,17 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
if (Helper.isOpenKeychainInstalled(context)) {
|
||||
spEncrypt.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
int last = (int) spEncrypt.getTag();
|
||||
if (last != position) {
|
||||
spEncrypt.setTag(position);
|
||||
setEncrypt(encryptValues[position]);
|
||||
|
||||
if ((encryptValues[position] == EntityMessage.PGP_SIGNONLY ||
|
||||
encryptValues[position] == EntityMessage.PGP_SIGNENCRYPT) &&
|
||||
Helper.isOpenKeychainInstalled(context)) {
|
||||
tvEncrypt.setPaintFlags(tvEncrypt.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvEncrypt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -7769,15 +7779,10 @@ public class FragmentCompose extends FragmentBase {
|
|||
v.getContext().startActivity(pm.getLaunchIntentForPackage(pkg));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
tvEncrypt.setPaintFlags(tvEncrypt.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
||||
tvEncrypt.setOnClickListener(null);
|
||||
}
|
||||
|
||||
spEncrypt.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
int last = (int) spEncrypt.getTag();
|
||||
if (last != position) {
|
||||
spEncrypt.setTag(position);
|
||||
setEncrypt(encryptValues[position]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue