do not show empty files at the mimetype activity

This commit is contained in:
tibbi 2021-10-13 19:08:36 +02:00
parent 5498c02f4c
commit a6976c4834

View File

@ -189,8 +189,12 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener {
return@queryCursor
}
val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA)
val size = cursor.getLongValue(MediaStore.Files.FileColumns.SIZE)
if (size == 0L) {
return@queryCursor
}
val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA)
val lastModified = cursor.getLongValue(MediaStore.Files.FileColumns.DATE_MODIFIED) * 1000
val mimetype = fullMimetype.substringBefore("/")