mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Small optimization
This commit is contained in:
@@ -103,4 +103,8 @@ public interface DaoAttachment {
|
||||
@Query("DELETE FROM attachment" +
|
||||
" WHERE id = :id")
|
||||
int deleteAttachment(long id);
|
||||
|
||||
@Query("DELETE FROM attachment" +
|
||||
" WHERE message = :message")
|
||||
int deleteAttachments(long message);
|
||||
}
|
||||
|
||||
@@ -4039,9 +4039,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
String html = parts.getHtml(context);
|
||||
Helper.writeText(message.getFile(context), html);
|
||||
|
||||
// Remove attachments
|
||||
for (EntityAttachment local : attachments)
|
||||
db.attachment().deleteAttachment(local.id);
|
||||
// Remove existing attachments
|
||||
db.attachment().deleteAttachments(id);
|
||||
|
||||
// Add decrypted attachments
|
||||
List<EntityAttachment> remotes = parts.getAttachments();
|
||||
|
||||
Reference in New Issue
Block a user