From 86c662d71c919cfd8e6799aa35d5acafaa159744 Mon Sep 17 00:00:00 2001 From: Colin White Date: Wed, 6 Nov 2024 20:18:07 -0800 Subject: [PATCH] Improve image pipeline docs. (#2650) --- docs/image_pipeline.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/image_pipeline.md b/docs/image_pipeline.md index 91c10c27b..881a16154 100644 --- a/docs/image_pipeline.md +++ b/docs/image_pipeline.md @@ -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() }