From 13464cb06b907879e067e5c82f8c86779e732361 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Sun, 18 Sep 2022 06:59:56 -0400 Subject: [PATCH] dismiss bottomSheet before opening the camera --- .../quick_actions/camera_quick_action/camera_type.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/post_draft/quick_actions/camera_quick_action/camera_type.tsx b/app/components/post_draft/quick_actions/camera_quick_action/camera_type.tsx index aed7eca16..411c4d594 100644 --- a/app/components/post_draft/quick_actions/camera_quick_action/camera_type.tsx +++ b/app/components/post_draft/quick_actions/camera_quick_action/camera_type.tsx @@ -57,26 +57,26 @@ const CameraType = ({onPress}: Props) => { const isTablet = useIsTablet(); const style = getStyle(theme); - const onPhoto = () => { + const onPhoto = async () => { const options: CameraOptions = { quality: 0.8, mediaType: 'photo', saveToPhotos: true, }; + await dismissBottomSheet(); onPress(options); - dismissBottomSheet(); }; - const onVideo = () => { + const onVideo = async () => { const options: CameraOptions = { videoQuality: 'high', mediaType: 'video', saveToPhotos: true, }; + await dismissBottomSheet(); onPress(options); - dismissBottomSheet(); }; return (