Optimized sync/donwload, improvements

This commit is contained in:
M66B
2018-09-16 18:07:26 +00:00
parent 5198802bc0
commit 26fdc79ad8
8 changed files with 240 additions and 157 deletions

View File

@@ -39,6 +39,12 @@ public interface DaoAttachment {
" WHERE message = :message")
int getAttachmentCount(long message);
@Query("SELECT COUNT(id)" +
" FROM attachment" +
" WHERE message = :message" +
" AND NOT available")
int getAttachmentDownloadCount(long message);
@Query("SELECT COUNT(id)" +
" FROM attachment" +
" WHERE id = :id")