mirror of https://github.com/M66B/FairEmail.git
Add signed-only drafts to remote server
This commit is contained in:
parent
a0397e068a
commit
ecc0392f77
|
@ -121,6 +121,14 @@ public class EntityOperation {
|
|||
for (Object value : values)
|
||||
jargs.put(value);
|
||||
|
||||
if (ADD.equals(name) &&
|
||||
(EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt) ||
|
||||
EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt))) {
|
||||
EntityFolder folder = db.folder().getFolder(message.folder);
|
||||
if (folder != null && EntityFolder.DRAFTS.equals(folder.type))
|
||||
return;
|
||||
}
|
||||
|
||||
if (MOVE.equals(name) &&
|
||||
(EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt) ||
|
||||
EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt))) {
|
||||
|
|
|
@ -2985,8 +2985,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
}
|
||||
|
||||
if (data.draft.encrypt == null || data.draft.encrypt == 0)
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.ADD);
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.ADD);
|
||||
} else {
|
||||
if (data.draft.revision == null) {
|
||||
data.draft.revision = 1;
|
||||
|
@ -3291,7 +3290,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
draft.ui_hide = ui_hide;
|
||||
db.message().updateMessage(draft);
|
||||
|
||||
if (draft.content && (draft.encrypt == null || draft.encrypt == 0))
|
||||
if (draft.content)
|
||||
EntityOperation.queue(context, draft, EntityOperation.ADD);
|
||||
}
|
||||
|
||||
|
@ -3467,8 +3466,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
action == R.id.action_redo ||
|
||||
action == R.id.action_check) {
|
||||
if (BuildConfig.DEBUG || dirty)
|
||||
if (draft.encrypt == null || draft.encrypt == 0)
|
||||
EntityOperation.queue(context, draft, EntityOperation.ADD);
|
||||
EntityOperation.queue(context, draft, EntityOperation.ADD);
|
||||
|
||||
if (action == R.id.action_check) {
|
||||
// Check data
|
||||
|
|
Loading…
Reference in New Issue