Fix subject being overwritten with `null`
Not using crypto-provider passes `null` as `plaintextSubject`.
`saveDraft` already has protection against overwriting subject with `null`.
This change adds the same check to `sendMessage`.
Fixes
@@ -1457,7 +1457,9 @@ public class MessagingController {
localFolder.appendMessages(Collections.singletonList(message));
LocalMessage localMessage = localFolder.getMessage(message.getUid());
localMessage.setFlag(Flag.X_DOWNLOADED_FULL, true);
+ if (plaintextSubject != null) {
localMessage.setCachedDecryptedSubject(plaintextSubject);
+ }
localFolder.close();
sendPendingMessages(account, listener);
} catch (Exception e) {
