Prevent removing attached images

This commit is contained in:
M66B 2020-06-25 11:49:42 +02:00
parent 058cfb031f
commit 2a734a8f83
1 changed files with 2 additions and 2 deletions

View File

@ -4285,8 +4285,8 @@ public class FragmentCompose extends FragmentBase {
}
for (EntityAttachment attachment : new ArrayList<>(attachments))
if (attachment.isInline() && attachment.isImage() &&
!cids.contains(attachment.cid)) {
if (!attachment.isAttachment() && attachment.isImage() &&
attachment.cid != null && !cids.contains(attachment.cid)) {
Log.i("Removing unused inline attachment cid=" + attachment.cid);
db.attachment().deleteAttachment(attachment.id);
}