Added button to remove all attachments

This commit is contained in:
M66B
2022-03-21 09:42:44 +01:00
parent aa6f72ec1d
commit 3f043372ec
4 changed files with 64 additions and 2 deletions

View File

@@ -157,6 +157,10 @@ public interface DaoAttachment {
" WHERE id = :id")
int deleteAttachment(long id);
@Query("DELETE FROM attachment" +
" WHERE message = :message")
int deleteAttachments(long message);
@Query("DELETE FROM attachment" +
" WHERE message = :message" +
" AND (encryption IS NULL OR encryption NOT IN (:keep))")