aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/CaptionScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-09 18:40:30 -0400
committerIvan Chen <ivan@tagg.id>2021-07-09 18:40:30 -0400
commitdff83dc855e9500bc228a1491601e660527afa10 (patch)
treef9f0eef6ef001a27af2f98790e08e77e3c955dd4 /src/screens/profile/CaptionScreen.tsx
parent9bbba285b989cd6bf1a9543b4fa0e97e2379616c (diff)
Allow preselect category from profile screen
Diffstat (limited to 'src/screens/profile/CaptionScreen.tsx')
-rw-r--r--src/screens/profile/CaptionScreen.tsx6
1 files changed, 6 insertions, 0 deletions
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<CaptionScreenProps> = ({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<CaptionScreenProps> = ({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