aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/moments/CameraScreen.tsx6
-rw-r--r--src/screens/profile/CaptionScreen.tsx6
2 files changed, 11 insertions, 1 deletions
diff --git a/src/screens/moments/CameraScreen.tsx b/src/screens/moments/CameraScreen.tsx
index 07c9b059..5f9412fb 100644
--- a/src/screens/moments/CameraScreen.tsx
+++ b/src/screens/moments/CameraScreen.tsx
@@ -30,7 +30,7 @@ interface CameraScreenProps {
navigation: CameraScreenNavigationProps;
}
const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => {
- const {screenType} = route.params;
+ const {screenType, selectedCategory} = route.params;
const cameraRef = createRef<RNCamera>();
const tabBarHeight = useBottomTabBarHeight();
const [cameraType, setCameraType] = useState<keyof CameraType>('front');
@@ -71,6 +71,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => {
uri,
isVideo: false,
},
+ selectedCategory,
});
};
@@ -94,6 +95,9 @@ const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => {
setShowSaveButton(false);
setMediaFromGallery('');
} else {
+ navigation.dangerouslyGetParent()?.setOptions({
+ tabBarVisible: true,
+ });
navigation.goBack();
}
};
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