diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-13 15:01:14 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-13 15:01:14 -0600 |
commit | 9a99c9c8c849a0b6bd5ef28fc1693fa0c0067008 (patch) | |
tree | 1a0de36d3f9eb01f69d2b12ffd3cba8f2ddbcac4 /src | |
parent | e8eb3e131cd0ca91c2307d482ea3e839adc1917f (diff) | |
download | voidsky-9a99c9c8c849a0b6bd5ef28fc1693fa0c0067008.tar.zst |
Hide main menu drawer on click outside
Diffstat (limited to 'src')
-rw-r--r-- | src/view/shell/mobile/index.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index 0e42cc134..308501d24 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -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 ? ( - <Animated.View style={[styles.screenMask, menuSwipeOpacity]} /> + <TouchableWithoutFeedback + onPress={() => store.shell.setMainMenuOpen(false)}> + <Animated.View style={[styles.screenMask, menuSwipeOpacity]} /> + </TouchableWithoutFeedback> ) : undefined} <Animated.View style={[styles.menuDrawer, menuSwipeTransform]}> <Menu |