Skip to content

Commit

Permalink
Improve image pipeline docs. (#2650)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite authored Nov 7, 2024
1 parent 8f9a436 commit 86c662d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/image_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,12 @@ class PartialUrlFetcher(
val response = callFactory.newCall(request).await()

// Read the image URL.
val imageUrl = readImageUrl(response.body).toUri()
val imageUrl: String = readImageUrl(response.body)

// This will delegate to the internal network fetcher.
val (fetcher) = checkNotNull(imageLoader.components.newFetcher(imageUrl, options, imageLoader)) {
"no supported fetcher"
}

val data = imageLoader.components.map(imageUrl, options)
val output = imageLoader.components.newFetcher(data, options, imageLoader)
val (fetcher) = checkNotNull(output) { "no supported fetcher" }
return fetcher.fetch()
}

Expand Down

0 comments on commit 86c662d

Please sign in to comment.