mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
do not trigger the database deleteMedia file, if there is nothing to delete
This commit is contained in:
@ -573,7 +573,9 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||
}
|
||||
}
|
||||
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
if (mediaToDelete.isNotEmpty()) {
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user