Log more errors.
This commit is contained in:
@@ -38,7 +38,9 @@ internal class CoilMediaFetcher(
|
||||
private val options: Options
|
||||
) : Fetcher {
|
||||
override suspend fun fetch(): FetchResult? {
|
||||
if (mediaData?.source == null) return null
|
||||
if (mediaData?.source == null) return null.also {
|
||||
Timber.e("MediaData source is null")
|
||||
}
|
||||
return when (mediaData.kind) {
|
||||
is MediaRequestData.Kind.Content -> fetchContent(mediaData.source, options)
|
||||
is MediaRequestData.Kind.Thumbnail -> fetchThumbnail(mediaData.source, mediaData.kind, options)
|
||||
@@ -72,6 +74,8 @@ internal class CoilMediaFetcher(
|
||||
source = mediaSource,
|
||||
).map { byteArray ->
|
||||
byteArray.asSourceResult(options)
|
||||
}.onFailure {
|
||||
Timber.e(it)
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
@@ -82,6 +86,8 @@ internal class CoilMediaFetcher(
|
||||
height = scalingFunction(kind.height.toFloat()).roundToLong(),
|
||||
).map { byteArray ->
|
||||
byteArray.asSourceResult(options)
|
||||
}.onFailure {
|
||||
Timber.e(it)
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user