Do not include pending downloads in storage usage.

Fixes #12231
This commit is contained in:
Greyson Parrelli 2022-08-19 11:36:42 -04:00
parent fa55062510
commit 62ea82a2ba

View file

@ -71,7 +71,7 @@ public class MediaDatabase extends Database {
+ "MAX(" + AttachmentDatabase.SIZE + ") as " + AttachmentDatabase.SIZE + ", "
+ AttachmentDatabase.CONTENT_TYPE + " "
+ "FROM " + AttachmentDatabase.TABLE_NAME + " "
+ "WHERE " + AttachmentDatabase.STICKER_PACK_ID + " IS NULL "
+ "WHERE " + AttachmentDatabase.STICKER_PACK_ID + " IS NULL AND " + AttachmentDatabase.TRANSFER_STATE + " = " + AttachmentDatabase.TRANSFER_PROGRESS_DONE + " "
+ "GROUP BY " + AttachmentDatabase.DATA;
private static final String GALLERY_MEDIA_QUERY = String.format(BASE_MEDIA_QUERY, AttachmentDatabase.CONTENT_TYPE + " NOT LIKE 'image/svg%' AND (" +