Subject: [PATCH] Uncacheable image --- Index: sample/src/main/AndroidManifest.xml IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml --- a/sample/src/main/AndroidManifest.xml (revision 25b42e44239a529efcfb4d2d87b97f2646050446) +++ b/sample/src/main/AndroidManifest.xml (date 1695644657327) @@ -11,6 +11,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" + android:usesCleartextTraffic="true" android:theme="@style/AppTheme" tools:ignore="AllowBackup,DataExtractionRules,UnusedAttribute"> Index: sample/src/main/kotlin/me/saket/telephoto/sample/SampleActivity.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/sample/src/main/kotlin/me/saket/telephoto/sample/SampleActivity.kt b/sample/src/main/kotlin/me/saket/telephoto/sample/SampleActivity.kt --- a/sample/src/main/kotlin/me/saket/telephoto/sample/SampleActivity.kt (revision 25b42e44239a529efcfb4d2d87b97f2646050446) +++ b/sample/src/main/kotlin/me/saket/telephoto/sample/SampleActivity.kt (date 1695645382125) @@ -34,6 +34,7 @@ Coil.setImageLoader( ImageLoader.Builder(this) .components { add(ImageDecoderDecoder.Factory()) } + // .respectCacheHeaders(false) .build() ) @@ -41,8 +42,8 @@ items = listOf( // Photo by Anita Austvika on https://unsplash.com/photos/yFxAORZcJQk. MediaItem.Image( - fullSizedUrl = "https://images.unsplash.com/photo-1678465952838-c9d7f5daaa65", - placeholderImageUrl = "https://images.unsplash.com/photo-1678465952838-c9d7f5daaa65?w=100", + fullSizedUrl = "http://10.0.2.2:3000/my-fking-image", + placeholderImageUrl = null, caption = "Breakfast", ), // Photos by Romain Guy on https://www.flickr.com/photos/romainguy/. Index: sample/src/main/kotlin/me/saket/telephoto/sample/viewer/MediaViewerScreen.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/sample/src/main/kotlin/me/saket/telephoto/sample/viewer/MediaViewerScreen.kt b/sample/src/main/kotlin/me/saket/telephoto/sample/viewer/MediaViewerScreen.kt --- a/sample/src/main/kotlin/me/saket/telephoto/sample/viewer/MediaViewerScreen.kt (revision 25b42e44239a529efcfb4d2d87b97f2646050446) +++ b/sample/src/main/kotlin/me/saket/telephoto/sample/viewer/MediaViewerScreen.kt (date 1695645901902) @@ -94,7 +94,16 @@ state = rememberZoomableImageState(zoomableState), model = ImageRequest.Builder(LocalContext.current) .data(model.fullSizedUrl) - .placeholderMemoryCacheKey(model.placeholderImageUrl) + .listener( + onError = { request, result -> + println("Error") + result.throwable.printStackTrace() + }, + onStart = { request -> + println("Start") + } + ) + // .placeholderMemoryCacheKey(model.placeholderImageUrl) .crossfade(300) .build(), contentDescription = model.caption,