aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/CaptionScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-09 15:23:12 -0400
committerIvan Chen <ivan@tagg.id>2021-07-09 15:56:47 -0400
commitaa25df7dbd192394f2d6d42ed07d1e1f43cc07f0 (patch)
tree3adc569211d931a561b15722f4d648ba198b60fd /src/screens/profile/CaptionScreen.tsx
parent74d0ad5bab6f0d058fc03095fa0a313499162579 (diff)
Fix mention box position, Fix image flickering
Diffstat (limited to 'src/screens/profile/CaptionScreen.tsx')
-rw-r--r--src/screens/profile/CaptionScreen.tsx53
1 files changed, 33 insertions, 20 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 9a1878aa..02b8caf2 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -1,6 +1,6 @@
import {RouteProp} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack';
-import React, {FC, useEffect, useState} from 'react';
+import React, {FC, useEffect, useMemo, useState} from 'react';
import {
Alert,
Image,
@@ -293,27 +293,39 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
placeholderTextColor="white"
value={caption}
onChange={setCaption}
- partTypes={mentionPartTypes('white', 'caption')}
+ partTypes={mentionPartTypes('white', 'caption', true)}
/>
</View>
- <SelectableItem
- text={'Category'}
- imageUri={require('../../assets/images/images.png')}
- onPress={() => navigation.navigate('ChoosingCategoryScreen', {})}
- />
- <SelectableItem
- text={'Tag Friends'}
- imageUri={require('../../assets/icons/tagging/tag-icon.png')}
- onPress={() =>
- navigation.navigate('TagFriendsScreen', {
- media: {
- uri: mediaUri,
- isVideo: isMediaAVideo,
- },
- selectedTags: tags,
- })
- }
- />
+ {useMemo(
+ () => (
+ <SelectableItem
+ text={'Category'}
+ imageUri={require('../../assets/images/images.png')}
+ onPress={() =>
+ navigation.navigate('ChoosingCategoryScreen', {})
+ }
+ />
+ ),
+ [momentCategory],
+ )}
+ {useMemo(
+ () => (
+ <SelectableItem
+ text={'Tag Friends'}
+ imageUri={require('../../assets/icons/tagging/tag-icon.png')}
+ onPress={() =>
+ navigation.navigate('TagFriendsScreen', {
+ media: {
+ uri: mediaUri,
+ isVideo: isMediaAVideo,
+ },
+ selectedTags: tags,
+ })
+ }
+ />
+ ),
+ [taggedUsersText],
+ )}
{momentCategory ? (
<TaggSquareButton
onPress={moment ? handleSubmitEditChanges : handleShare}
@@ -371,6 +383,7 @@ const styles = StyleSheet.create({
borderColor: 'white',
borderTopWidth: 1,
borderBottomWidth: 1,
+ zIndex: 1,
},
media: {
height: normalize(150),