fix: apply changes from review
This commit is contained in:
parent
b8417d8c5e
commit
79dfe34189
@ -129,6 +129,7 @@ class CKCameraManager : SimpleViewManager<CKCamera>(), CKCameraManagerInterface<
|
||||
view.setShutterPhotoSound(enabled);
|
||||
}
|
||||
|
||||
// Methods only available on iOS
|
||||
override fun setRatioOverlay(view: CKCamera?, value: String?) = Unit
|
||||
|
||||
override fun setRatioOverlayColor(view: CKCamera?, value: Int?) = Unit
|
||||
|
||||
@ -10,10 +10,7 @@ const Camera = React.forwardRef<CameraApi, CameraProps>((props, ref) => {
|
||||
|
||||
React.useImperativeHandle(ref, () => ({
|
||||
capture: async (options = {}) => {
|
||||
// Because RN doesn't support return types for ViewManager methods
|
||||
// we must use the general module and tell it what View it's supposed to be using
|
||||
// @ts-ignore make TS happy
|
||||
return await NativeCameraKitModule.capture(options, findNodeHandle(nativeRef.current ?? null));
|
||||
return await NativeCameraKitModule.capture(options, findNodeHandle(nativeRef.current ?? null) ?? undefined);
|
||||
},
|
||||
requestDeviceCameraAuthorization: () => {
|
||||
throw new Error('Not implemented');
|
||||
|
||||
@ -13,8 +13,7 @@ const Camera = React.forwardRef<CameraApi, CameraProps>((props, ref) => {
|
||||
|
||||
React.useImperativeHandle(ref, () => ({
|
||||
capture: async () => {
|
||||
// @ts-ignore it was like this already
|
||||
return await NativeCameraKitModule.capture({}, findNodeHandle(nativeRef.current ?? null));
|
||||
return await NativeCameraKitModule.capture({}, findNodeHandle(nativeRef.current ?? null) ?? undefined);
|
||||
},
|
||||
requestDeviceCameraAuthorization: async () => {
|
||||
return await NativeCameraKitModule.checkDeviceCameraAuthorizationStatus();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user