mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Delete local POP3 message/attachment files
This commit is contained in:
parent
7952c3da3d
commit
acf43a6891
2 changed files with 10 additions and 1 deletions
|
@ -1273,7 +1273,11 @@ class Core {
|
|||
DB db = DB.getInstance(context);
|
||||
|
||||
if (EntityFolder.INBOX.equals(folder.type)) {
|
||||
if (!account.leave_deleted) {
|
||||
if (account.leave_deleted) {
|
||||
// Remove message/attachments files on cleanup
|
||||
db.message().resetMessageContent(message.id);
|
||||
db.attachment().resetAvailable(message.id);
|
||||
} else {
|
||||
Map<String, String> caps = istore.capabilities();
|
||||
|
||||
Message[] imessages = ifolder.getMessages();
|
||||
|
|
|
@ -82,6 +82,11 @@ public interface DaoAttachment {
|
|||
" WHERE id = :id")
|
||||
void setAvailable(long id, boolean available);
|
||||
|
||||
@Query("UPDATE attachment" +
|
||||
" SET size = NULL, progress = NULL, available = 0" +
|
||||
" WHERE message = :message")
|
||||
void resetAvailable(long message);
|
||||
|
||||
@Query("UPDATE attachment" +
|
||||
" SET error = :error, progress = NULL, available = 0" +
|
||||
" WHERE id = :id")
|
||||
|
|
Loading…
Reference in a new issue