mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Simplification
This commit is contained in:
parent
30333cc356
commit
bc57c37eda
1 changed files with 8 additions and 12 deletions
|
@ -3434,8 +3434,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
File file = attachment.getFile(context);
|
||||
ics.renameTo(file);
|
||||
|
||||
last_available++;
|
||||
|
||||
ICalendar icalendar = Biweekly.parse(file).first();
|
||||
VEvent event = icalendar.getEvents().get(0);
|
||||
Organizer organizer = event.getOrganizer();
|
||||
|
@ -3491,8 +3489,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
File target = attachment.getFile(context);
|
||||
Helper.copy(source, target);
|
||||
|
||||
last_available++;
|
||||
|
||||
if (resize_reply && !"forward".equals(action))
|
||||
resizeAttachment(context, attachment, REDUCED_IMAGE_SIZE);
|
||||
} else
|
||||
|
@ -3548,17 +3544,17 @@ public class FragmentCompose extends FragmentBase {
|
|||
EntityOperation.queue(context, data.draft, EntityOperation.BODY);
|
||||
}
|
||||
|
||||
List<EntityAttachment> attachments = db.attachment().getAttachments(data.draft.id);
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.available) {
|
||||
if (attachment.encryption == null)
|
||||
last_available++;
|
||||
} else
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.ATTACHMENT, attachment.id);
|
||||
|
||||
args.putBoolean("saved", true);
|
||||
}
|
||||
|
||||
List<EntityAttachment> attachments = db.attachment().getAttachments(data.draft.id);
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.available) {
|
||||
if (attachment.encryption == null)
|
||||
last_available++;
|
||||
} else
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.ATTACHMENT, attachment.id);
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
|
Loading…
Reference in a new issue