Split deletion lines for clarity

This commit is contained in:
Ensar Sarajčić 2023-07-25 08:24:29 +02:00
parent 7aba993726
commit b9035f2612
1 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,8 @@ fun BaseSimpleActivity.deleteRecordings(recordingsToRemove: Collection<Recording
val result = contentResolver.delete(uri, selection, selectionArgs)
if (result == 0) {
deleteFile(File(it.path).toFileDirItem(this))
val fileDirItem = File(it.path).toFileDirItem(this)
deleteFile(fileDirItem)
}
}
callback(true)
@ -39,7 +40,8 @@ fun BaseSimpleActivity.deleteRecordings(recordingsToRemove: Collection<Recording
else -> {
recordingsToRemove.forEach {
deleteFile(File(it.path).toFileDirItem(this))
val fileDirItem = File(it.path).toFileDirItem(this)
deleteFile(fileDirItem)
}
callback(true)
}