Open ugar0ff opened 2 years ago
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
Please test on latest version
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