From 43a80a0c1e8fca102ed3bdacb03ef512b63f409b Mon Sep 17 00:00:00 2001 From: Tlaster Date: Tue, 30 Apr 2024 16:02:27 +0900 Subject: [PATCH] fix build --- .../dev/dimension/flare/ui/component/ZoomableCoil3Image.kt | 6 ++++-- .../dimension/flare/ui/component/subSamplingEligibility.kt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/dev/dimension/flare/ui/component/ZoomableCoil3Image.kt b/app/src/main/java/dev/dimension/flare/ui/component/ZoomableCoil3Image.kt index 251617675..b040d7845 100644 --- a/app/src/main/java/dev/dimension/flare/ui/component/ZoomableCoil3Image.kt +++ b/app/src/main/java/dev/dimension/flare/ui/component/ZoomableCoil3Image.kt @@ -202,7 +202,8 @@ internal class Resolver( ResolveResult( placeholder = it?.asDrawable(resources)?.asPainter(), delegate = resolved.delegate, - crossfadeDuration = Duration.ZERO, // resolved.crossfadeDuration + // resolved.crossfadeDuration + crossfadeDuration = Duration.ZERO, ) }, ) @@ -213,7 +214,8 @@ internal class Resolver( resolved = ResolveResult( placeholder = resolved.placeholder, - crossfadeDuration = Duration.ZERO, // result.crossfadeDuration(), + // result.crossfadeDuration(), + crossfadeDuration = Duration.ZERO, delegate = if (result is SuccessResult && imageSource != null) { ZoomableImageSource.SubSamplingDelegate( diff --git a/app/src/main/java/dev/dimension/flare/ui/component/subSamplingEligibility.kt b/app/src/main/java/dev/dimension/flare/ui/component/subSamplingEligibility.kt index d560b3731..cdda9f4f3 100644 --- a/app/src/main/java/dev/dimension/flare/ui/component/subSamplingEligibility.kt +++ b/app/src/main/java/dev/dimension/flare/ui/component/subSamplingEligibility.kt @@ -36,7 +36,7 @@ internal suspend fun SubSamplingImageSource.canBeSubSampled(): Boolean { context(Resolver) private fun ResourceImageSource.isVectorDrawable(): Boolean = TypedValue().apply { - request.context.resources.getValue(id, this, /* resolveRefs = */ true) + request.context.resources.getValue(id, this, true) }.string.endsWith(".xml") context(Resolver)