diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-07-16 21:15:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-16 21:15:07 -0400 |
| commit | 9766c3b0b4764052d708dba2a20d9673230de9c7 (patch) | |
| tree | 40703c8d2dd5abf0a24c07ab8932559ebc2f9cd5 /src/screens | |
| parent | 4ebb552aef8c5f6136c9359c54f2e4e1aa921241 (diff) | |
| parent | c1b4e35862172b2268a3a53ece0acc807260652e (diff) | |
Merge pull request #514 from IvanIFChen/tma988-remove-positioned-tags-for-video-moments
[TMA-988] Remove Positioned Tags for Video Moments
Diffstat (limited to 'src/screens')
| -rw-r--r-- | src/screens/moments/TagFriendsScreen.tsx | 25 | ||||
| -rw-r--r-- | src/screens/profile/CaptionScreen.tsx | 6 |
2 files changed, 19 insertions, 12 deletions
diff --git a/src/screens/moments/TagFriendsScreen.tsx b/src/screens/moments/TagFriendsScreen.tsx index fc3bccf2..d11f8049 100644 --- a/src/screens/moments/TagFriendsScreen.tsx +++ b/src/screens/moments/TagFriendsScreen.tsx @@ -188,13 +188,17 @@ const TagFriendsScreen: React.FC<TagFriendsScreenProps> = ({route}) => { /> </View> </TouchableOpacity> - <TouchableWithoutFeedback style={styles.captionContainer}> - {tags.length === 0 ? ( - <Text style={styles.header}>Tap on photo to tag friends!</Text> - ) : ( - <Text style={styles.header}>Press and drag to move</Text> - )} - </TouchableWithoutFeedback> + {!media.isVideo ? ( + <TouchableWithoutFeedback style={styles.headerContainer}> + {tags.length === 0 ? ( + <Text style={styles.header}>Tap on photo to tag friends!</Text> + ) : ( + <Text style={styles.header}>Press and drag to move</Text> + )} + </TouchableWithoutFeedback> + ) : ( + <View style={styles.headerPlaceholder} /> + )} <TouchableOpacity style={styles.buttonContainer} // Altering the opacity style of TouchableOpacity doesn't work, @@ -213,7 +217,7 @@ const TagFriendsScreen: React.FC<TagFriendsScreenProps> = ({route}) => { </Text> </TouchableOpacity> </View> - {tags.length !== 0 && ( + {tags.length !== 0 && !media.isVideo && ( <MomentTags tags={tags} setTags={setTags} @@ -260,12 +264,15 @@ const styles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'flex-end', }, - captionContainer: { + headerContainer: { width: SCREEN_WIDTH, flexDirection: 'row', justifyContent: 'center', zIndex: 9999, }, + headerPlaceholder: { + width: SCREEN_WIDTH * 0.5, + }, shareButtonTitle: { fontWeight: 'bold', fontSize: 18, diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index eba3e4bf..7f77bdca 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -152,9 +152,9 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { const formattedTags = () => { return tags.map((tag) => ({ - x: tag.x, - y: tag.y, - z: tag.z, + x: isMediaAVideo ? 0 : tag.x, + y: isMediaAVideo ? 0 : tag.y, + z: isMediaAVideo ? 0 : tag.z, user_id: tag.user.id, })); }; |
