From 0c252a3337e7d912501e19f02e183a8f4055c6e5 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Fri, 1 Jan 2021 15:49:29 +0500 Subject: [PATCH] close ActionStrip and not open note --- apps/mobile/src/components/SelectionWrapper/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/components/SelectionWrapper/index.js b/apps/mobile/src/components/SelectionWrapper/index.js index 0a14f0810..b173026a4 100644 --- a/apps/mobile/src/components/SelectionWrapper/index.js +++ b/apps/mobile/src/components/SelectionWrapper/index.js @@ -352,6 +352,14 @@ const SelectionWrapper = ({ setActionStrip(!actionStrip); }; + const _onPress = async () => { + if (actionStrip) { + setActionStrip(false); + return; + } + await onPress(); + } + const closeStrip = () => { setActionStrip(false); }; @@ -369,7 +377,7 @@ const SelectionWrapper = ({ customColor="transparent" testID={testID} onLongPress={onLong} - onPress={onPress} + onPress={_onPress} customSelectedColor={colors.nav} customAlpha={!colors.night ? -0.02 : 0.02} customOpacity={1}