Skip to content

Commit

Permalink
- Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
vrajendraBhavsar committed Mar 26, 2024
1 parent 58cefce commit 27ba25f
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ class LassiMediaPickerActivity :
lifecycleScope.launch {
val resultList: ArrayList<MiMedia> = withContext(Dispatchers.IO) {
uris.map { uri ->
val miMedia = MiMedia()
miMedia.name = getFileName(uri)
miMedia.doesUri = false
miMedia.fileSize = getFileSize(uri)
miMedia.path =
getFilePathFromUri(this@LassiMediaPickerActivity, uri, true)
Log.d("TAG", "!@# SLOWER MEDIA ITEM: ${miMedia.name}")
miMedia
MiMedia().apply {
name = getFileName(uri)
doesUri = false
fileSize = getFileSize(uri)
path = getFilePathFromUri(this@LassiMediaPickerActivity, uri, true)
Log.d("TAG", "!@# SLOWER MEDIA ITEM: $name")
}
} as ArrayList<MiMedia>
}

Expand Down

0 comments on commit 27ba25f

Please sign in to comment.