Media: handle PR review remarks

This commit is contained in:
ganfra 2023-05-26 19:09:51 +02:00
parent c72ecc4807
commit b2a66ddafe
6 changed files with 8 additions and 9 deletions

View file

@ -35,8 +35,7 @@ internal class CoilMediaFetcher(
override suspend fun fetch(): FetchResult? {
return loadMedia()
.map { data ->
ByteBuffer.wrap(data)
}.map { byteBuffer ->
val byteBuffer = ByteBuffer.wrap(data)
imageLoader.components.newFetcher(byteBuffer, options, imageLoader)?.first?.fetch()
}.getOrThrow()
}