mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
adding a null check at deleting files
This commit is contained in:
parent
8603661873
commit
25b31eb5a7
1 changed files with 3 additions and 0 deletions
|
@ -230,6 +230,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
private fun getCurrentFile() = File(media[selectedPositions.first()].path)
|
||||
|
||||
private fun deleteFiles() {
|
||||
if (selectedPositions.isEmpty())
|
||||
return
|
||||
|
||||
val files = ArrayList<File>(selectedPositions.size)
|
||||
val removeMedia = ArrayList<Medium>(selectedPositions.size)
|
||||
|
||||
|
|
Loading…
Reference in a new issue