mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-14 19:15:41 +01:00
adding a null check at deleting files
This commit is contained in:
parent
8603661873
commit
25b31eb5a7
@ -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 New Issue
Block a user