Skip to content

Commit

Permalink
fix: coil load image use the original dimensions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyDaddy authored Feb 4, 2024
1 parent 27b6f40 commit fc29a6a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
import coil.decode.SvgDecoder
import coil.request.ImageRequest
import coil.size.Size
import com.facebook.react.bridge.ReactApplicationContext
import com.jimmydaddy.imagemarker.base.Constants.IMAGE_MARKER_TAG
import com.jimmydaddy.imagemarker.base.ErrorCode
Expand Down Expand Up @@ -56,6 +57,8 @@ class MarkerImageLoader(private val context: ReactApplicationContext, private va
if (img.src != null && img.src.width > 0 && img.src.height > 0) {
request = request.size(img.src.width, img.src.height)
Log.d(IMAGE_MARKER_TAG, "src.width: " + img.src.width + " src.height: " + img.src.height)
} else {
request = request.size(Size.ORIGINAL)
}
imageLoader.enqueue(request.target (
onStart = { _ ->
Expand Down

0 comments on commit fc29a6a

Please sign in to comment.