react-native-image-crop-tools icon indicating copy to clipboard operation
react-native-image-crop-tools copied to clipboard

Fix crash

Open ugar0ff opened this issue 4 years ago • 1 comments

Good Day! I found crash, and this code helped me:

override fun createViewInstance(reactContext: ThemedReactContext): CropImageView { val view = CropImageView(reactContext) view.setOnCropImageCompleteListener { _, result -> if (result.isSuccessful && result.cropRect != null) { val map = Arguments.createMap() map.putString("uri", result.uri.toString()) map.putInt("width", result.cropRect.width()) map.putInt("height", result.cropRect.height()) reactContext.getJSModule(RCTEventEmitter::class.java)?.receiveEvent( view.id, ON_IMAGE_SAVED, map ) } } return view }

Add this fix to this library

ugar0ff avatar Oct 16 '21 20:10 ugar0ff

Please test on latest version

hhunaid avatar Oct 22 '21 00:10 hhunaid