From 34dc05bae9b16f2fc8ce2cb9532a4498192d13fb Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 12 Jul 2021 18:14:07 -0400 Subject: Remove hide tab bar logic on fail --- src/screens/profile/CaptionScreen.tsx | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 1232eb66..4a18c895 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -115,9 +115,6 @@ 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); -- cgit v1.2.3-70-g09d2 From 1691e948830546cd78f1ac8213f4cf6e03754931 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Wed, 14 Jul 2021 01:15:06 -0700 Subject: Include relevent filename while posting moment --- src/services/MomentService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/services/MomentService.ts b/src/services/MomentService.ts index 50cedef9..9a74e8e8 100644 --- a/src/services/MomentService.ts +++ b/src/services/MomentService.ts @@ -23,10 +23,10 @@ export const postMoment = async ( ) => { try { const request = new FormData(); - + const uriTokens = uri.split('/'); request.append('image', { uri: uri, - name: 'moment.jpg', + name: uriTokens[uriTokens.length - 1], type: 'image/jpg', }); request.append('moment', category); -- cgit v1.2.3-70-g09d2 From 86eb60aff8a44e34022e77eff693083a3afaec1f Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 14 Jul 2021 16:48:05 -0400 Subject: Change filename to use a random hash instead of original filename --- src/services/MomentService.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/services/MomentService.ts b/src/services/MomentService.ts index 9a74e8e8..25d44041 100644 --- a/src/services/MomentService.ts +++ b/src/services/MomentService.ts @@ -23,10 +23,13 @@ export const postMoment = async ( ) => { try { const request = new FormData(); - const uriTokens = uri.split('/'); + + const fileExtension = uri.split('.').pop(); + const extension = fileExtension ? `.${fileExtension}` : '.jpg'; + request.append('image', { uri: uri, - name: uriTokens[uriTokens.length - 1], + name: Math.random().toString(36).substring(7) + extension, type: 'image/jpg', }); request.append('moment', category); -- cgit v1.2.3-70-g09d2 From d012373314f1af1b02e35994cce9f4450380b35e Mon Sep 17 00:00:00 2001 From: George Rusu Date: Tue, 13 Jul 2021 16:14:49 -0700 Subject: Remove floor --- src/screens/profile/CaptionScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 1232eb66..09a82e32 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -156,8 +156,8 @@ const CaptionScreen: React.FC = ({route, navigation}) => { const formattedTags = () => { return tags.map((tag) => ({ - x: Math.floor(tag.x), - y: Math.floor(tag.y), + x: tag.x, + y: tag.y, z: Math.floor(tag.z), user_id: tag.user.id, })); -- cgit v1.2.3-70-g09d2 From bc9001004b44f84aa3bd850e6bd3eccbe1ae4c27 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 15 Jul 2021 15:24:58 -0400 Subject: Fix tag position issue --- src/components/moments/MomentPost.tsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx index 07295369..e789a9bf 100644 --- a/src/components/moments/MomentPost.tsx +++ b/src/components/moments/MomentPost.tsx @@ -83,6 +83,7 @@ const MomentPost: React.FC = ({ moment.moment_url.endsWith('GIF') || moment.moment_url.endsWith('gif') ); + const mediaHeight = SCREEN_WIDTH / aspectRatio; /* * Load tags on initial render to pass tags data to moment header and content @@ -201,14 +202,7 @@ const MomentPost: React.FC = ({ {isVideo ? ( - +