mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 08:23:24 +00:00
Simplification
This commit is contained in:
parent
9f1fe2784c
commit
2034cafa6b
1 changed files with 4 additions and 5 deletions
|
@ -1350,16 +1350,16 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
|
||||
Intent intent;
|
||||
if (EntityMessage.PGP_SIGNONLY.equals(draft.encrypt)) {
|
||||
if (EntityMessage.PGP_SIGNONLY.equals(draft.encrypt))
|
||||
intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID);
|
||||
intent.putExtra(BuildConfig.APPLICATION_ID, working);
|
||||
} else if (EntityMessage.PGP_SIGNENCRYPT.equals(draft.encrypt)) {
|
||||
else if (EntityMessage.PGP_SIGNENCRYPT.equals(draft.encrypt)) {
|
||||
intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS);
|
||||
intent.putExtra(OpenPgpApi.EXTRA_USER_IDS, pgpUserIds);
|
||||
intent.putExtra(BuildConfig.APPLICATION_ID, working);
|
||||
} else
|
||||
throw new IllegalArgumentException("Invalid encrypt=" + draft.encrypt);
|
||||
|
||||
intent.putExtra(BuildConfig.APPLICATION_ID, working);
|
||||
|
||||
onPgp(intent);
|
||||
} catch (Throwable ex) {
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
|
@ -1800,7 +1800,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
} else {
|
||||
// Get sign key
|
||||
Intent intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID);
|
||||
intent.putExtra(OpenPgpApi.EXTRA_USER_IDS, pgpUserIds);
|
||||
intent.putExtra(BuildConfig.APPLICATION_ID, draft.id);
|
||||
return intent;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue