Hide main menu drawer on click outside

zio/stable
Paul Frazee 2022-12-13 15:01:14 -06:00
parent e8eb3e131c
commit 9a99c9c8c8
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import {
StyleSheet,
Text,
TouchableOpacity,
TouchableWithoutFeedback,
useColorScheme,
useWindowDimensions,
View,
@ -394,7 +395,10 @@ export const MobileShell: React.FC = observer(() => {
)}
</ScreenContainer>
{isMenuActive || menuSwipingDirection !== 0 ? (
<TouchableWithoutFeedback
onPress={() => store.shell.setMainMenuOpen(false)}>
<Animated.View style={[styles.screenMask, menuSwipeOpacity]} />
</TouchableWithoutFeedback>
) : undefined}
<Animated.View style={[styles.menuDrawer, menuSwipeTransform]}>
<Menu