diff --git a/cropify/src/main/java/io/moyuru/cropify/Cropify.kt b/cropify/src/main/java/io/moyuru/cropify/Cropify.kt index 94bfd8c..8fcabbf 100644 --- a/cropify/src/main/java/io/moyuru/cropify/Cropify.kt +++ b/cropify/src/main/java/io/moyuru/cropify/Cropify.kt @@ -98,12 +98,11 @@ fun Cropify( LaunchedEffect(state.shouldCrop) { if (state.shouldCrop) { val loadedUri = state.loadedUri - if (loadedUri != null) { + val cropped = if (loadedUri != null) { cropSampledImage(context, bitmap, loadedUri, state.frameRect, state.imageRect, state.inSampleSize) } else { cropImage(bitmap, state.frameRect, state.imageRect) } - val cropped = cropImage(bitmap, state.frameRect, state.imageRect) state.shouldCrop = false onImageCropped(cropped) }