aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-24 16:30:45 -0400
committerIvan Chen <ivan@tagg.id>2021-05-24 16:30:45 -0400
commit002015e9943ab34d7690babf0fdd24e16b62cf17 (patch)
tree4e6ba4fea3d1ab926681208f4f5fb5846069059c
parent5afdf9208fd3d7498a2595797e6c9fb5f567fc61 (diff)
Reorganize components in TaggDraggable
-rw-r--r--src/components/common/MomentTags.tsx3
-rw-r--r--src/components/taggs/TaggDraggable.tsx37
2 files changed, 20 insertions, 20 deletions
diff --git a/src/components/common/MomentTags.tsx b/src/components/common/MomentTags.tsx
index 04b0558b..defd4b4b 100644
--- a/src/components/common/MomentTags.tsx
+++ b/src/components/common/MomentTags.tsx
@@ -60,7 +60,8 @@ const MomentTags: React.FC<MomentTagsProps> = ({
minY={offset[1]}
maxX={imageDimensions[0] + offset[0]}
maxY={imageDimensions[1] + offset[1]}
- onDragStart={() => null}>
+ onDragStart={() => null}
+ disabled={true}>
<TaggDraggable
taggedUser={tag.user}
editingView={editing}
diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx
index e4448642..55f8162b 100644
--- a/src/components/taggs/TaggDraggable.tsx
+++ b/src/components/taggs/TaggDraggable.tsx
@@ -47,10 +47,11 @@ const TaggDraggable: React.FC<TaggDraggableProps> = (
return (
<TouchableWithoutFeedback>
- <View style={styles.container}>
- <Image style={styles.imageTip} source={uriTip} />
+ <View ref={draggableRef}>
<TouchableOpacity
- onPressIn={() =>
+ style={styles.container}
+ disabled={editingView}
+ onPress={() =>
navigateToProfile(
state,
dispatch,
@@ -58,22 +59,20 @@ const TaggDraggable: React.FC<TaggDraggableProps> = (
ScreenType.Profile,
user,
)
- }
- disabled={editingView}
- style={styles.content}
- ref={draggableRef}>
- <Avatar style={styles.avatar} uri={taggedUser.thumbnail_url} />
- <Text style={editingView ? styles.buttonTitle : styles.buttonTitleX}>
- @{taggedUser.username}
- </Text>
- {editingView && (
- <TouchableOpacity
- disabled={false}
- onPressIn={deleteFromList}
- style={styles.imageX}>
- <Image style={styles.imageX} source={uriX} />
- </TouchableOpacity>
- )}
+ }>
+ <Image style={styles.imageTip} source={uriTip} />
+ <View style={styles.content}>
+ <Avatar style={styles.avatar} uri={taggedUser.thumbnail_url} />
+ <Text
+ style={editingView ? styles.buttonTitle : styles.buttonTitleX}>
+ @{taggedUser.username}
+ </Text>
+ {editingView && (
+ <TouchableOpacity onPress={deleteFromList} style={styles.imageX}>
+ <Image style={styles.imageX} source={uriX} />
+ </TouchableOpacity>
+ )}
+ </View>
</TouchableOpacity>
</View>
</TouchableWithoutFeedback>