From a8963146c72be5b048d061df2dbcc322cb674877 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Fri, 14 May 2021 15:25:44 -0400
Subject: removed hacky fix, added state check

---
 src/components/common/BottomDrawer.tsx | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'src/components/common/BottomDrawer.tsx')

diff --git a/src/components/common/BottomDrawer.tsx b/src/components/common/BottomDrawer.tsx
index 3d9c0471..16e98690 100644
--- a/src/components/common/BottomDrawer.tsx
+++ b/src/components/common/BottomDrawer.tsx
@@ -71,15 +71,14 @@ const BottomDrawer: React.FC<BottomDrawerProps> = (props) => {
         enabledContentGestureInteraction={false}
         callbackNode={bgAlpha}
         onCloseEnd={() => {
-          setModalVisible(false);
-          setIsOpen(false);
+          if (!isOpen) {
+            setModalVisible(false);
+            setIsOpen(false);
+          }
         }}
       />
 
-      <TouchableWithoutFeedback
-        onPress={() => {
-          setIsOpen(false);
-        }}>
+      <TouchableWithoutFeedback onPress={() => setIsOpen(false)}>
         <Animated.View style={[styles.backgroundView, {backgroundColor}]} />
       </TouchableWithoutFeedback>
     </Modal>
-- 
cgit v1.2.3-70-g09d2

