mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Reset unused cids, refactoring
This commit is contained in:
@@ -60,10 +60,20 @@ public interface DaoAttachment {
|
||||
EntityAttachment getAttachment(long message, String cid);
|
||||
|
||||
@Query("UPDATE attachment" +
|
||||
" SET progress = :progress" +
|
||||
" SET progress = :progress, available = 0" +
|
||||
" WHERE id = :id")
|
||||
void setProgress(long id, Integer progress);
|
||||
|
||||
@Query("UPDATE attachment" +
|
||||
" SET size = :size, progress = NULL, available = 1" +
|
||||
" WHERE id = :id")
|
||||
void setDownloaded(long id, Integer size);
|
||||
|
||||
@Query("UPDATE attachment" +
|
||||
" SET cid = NULL" +
|
||||
" WHERE id = :id")
|
||||
void clearCid(long id);
|
||||
|
||||
@Insert
|
||||
long insertAttachment(EntityAttachment attachment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user