From dff83dc855e9500bc228a1491601e660527afa10 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 9 Jul 2021 18:40:30 -0400 Subject: Allow preselect category from profile screen --- src/screens/profile/CaptionScreen.tsx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/screens/profile') diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 484070d2..1232eb66 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -115,6 +115,9 @@ const CaptionScreen: React.FC = ({route, navigation}) => { const handleFailed = (noCategory = false) => { setLoading(false); + navigation.dangerouslyGetParent()?.setOptions({ + tabBarVisible: true, + }); setTimeout(() => { if (noCategory) { Alert.alert(ERROR_NO_MOMENT_CATEGORY); @@ -125,6 +128,9 @@ const CaptionScreen: React.FC = ({route, navigation}) => { }; const handleSuccess = () => { setLoading(false); + navigation.dangerouslyGetParent()?.setOptions({ + tabBarVisible: true, + }); if (!moment) { // if posting, pop all screens until at camera screen (default upload screen) // then switch to the profile tab -- cgit v1.2.3-70-g09d2