mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
delete only media files at deleting a folder
This commit is contained in:
parent
34d015734e
commit
d2546e1a3e
2 changed files with 3 additions and 1 deletions
|
@ -132,6 +132,8 @@ class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
fun isPhotoVideo(file: File) = file.isPhotoVideo()
|
||||
|
||||
fun needsStupidWritePermissions(context: Context, path: String) = context.needsStupidWritePermissions(path)
|
||||
|
||||
fun getFileDocument(context: Context, path: String, treeUri: String) = context.getFileDocument(path, treeUri)
|
||||
|
|
|
@ -235,7 +235,7 @@ public class MainActivity extends SimpleActivity
|
|||
if (dir.exists()) {
|
||||
final File[] files = dir.listFiles();
|
||||
for (File file : files) {
|
||||
if (file.isFile()) {
|
||||
if (file.isFile() && Utils.Companion.isPhotoVideo(file)) {
|
||||
updatedFiles.add(file);
|
||||
deleteItem(file);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue