mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 05:15:13 +02:00
Progress bar for attachment downloads
This commit is contained in:
@@ -30,12 +30,20 @@ import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface DaoAttachment {
|
||||
@Query("SELECT * FROM attachment WHERE message = :message")
|
||||
LiveData<List<EntityAttachment>> liveAttachments(long message);
|
||||
@Query("SELECT id,message,sequence,name,type,size,progress" +
|
||||
", (NOT content IS NULL) as content" +
|
||||
" FROM attachment WHERE message = :message")
|
||||
LiveData<List<TupleAttachment>> liveAttachments(long message);
|
||||
|
||||
@Query("SELECT * FROM attachment WHERE message = :message AND sequence = :sequence")
|
||||
EntityAttachment getAttachment(long message, int sequence);
|
||||
|
||||
@Query("UPDATE attachment SET progress = :progress WHERE id = :id")
|
||||
void setProgress(long id, int progress);
|
||||
|
||||
@Query("SELECT content FROM attachment WHERE id = :id")
|
||||
byte[] getContent(long id);
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
long insertAttachment(EntityAttachment attachment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user