aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/taggs/TwitterTaggPost.tsx99
1 files changed, 52 insertions, 47 deletions
diff --git a/src/components/taggs/TwitterTaggPost.tsx b/src/components/taggs/TwitterTaggPost.tsx
index 2b064610..158b5995 100644
--- a/src/components/taggs/TwitterTaggPost.tsx
+++ b/src/components/taggs/TwitterTaggPost.tsx
@@ -73,54 +73,58 @@ const TwitterTaggPost: React.FC<TwitterTaggPostProps> = ({
)}
{/* Third part of content is the reply/retweet container or empty */}
{(post.type === 'reply' || post.type === 'retweet') &&
- post.in_reply_to ? (
- <LinearGradient
- colors={[TAGGS_GRADIENT.start, TAGGS_GRADIENT.end]}
- useAngle={true}
- angle={300}
- angleCenter={{x: 0.5, y: 0.5}}
- style={[styles.replyGradient]}>
- <View style={styles.replyPostContainer}>
- <View style={styles.replyHeader}>
- <Image
- style={styles.replyAvatar}
- source={
- post.in_reply_to.profile_pic
- ? {uri: post.in_reply_to.profile_pic}
- : require('../../assets/images/avatar-placeholder.png')
- }
- />
- <Text
- style={styles.replyHandleText}
- onPress={() =>
- openTwitterProfileLink(post.in_reply_to?.handle)
- }>
- @{post.in_reply_to.handle}
+ post.in_reply_to && (
+ <LinearGradient
+ colors={[TAGGS_GRADIENT.start, TAGGS_GRADIENT.end]}
+ useAngle={true}
+ angle={300}
+ angleCenter={{x: 0.5, y: 0.5}}
+ style={[styles.replyGradient]}>
+ <View style={styles.replyPostContainer}>
+ <View style={styles.replyHeader}>
+ {post.in_reply_to.text !== 'This tweet is unavailable' && (
+ <>
+ <Image
+ style={styles.replyAvatar}
+ source={
+ post.in_reply_to.profile_pic
+ ? {uri: post.in_reply_to.profile_pic}
+ : require('../../assets/images/avatar-placeholder.png')
+ }
+ />
+ <Text
+ style={styles.replyHandleText}
+ onPress={() =>
+ openTwitterProfileLink(post.in_reply_to?.handle)
+ }>
+ @{post.in_reply_to.handle}
+ </Text>
+ {/* We're not displaying any images here in the container */}
+ <DateLabel
+ timestamp={post.in_reply_to.timestamp}
+ type={'short'}
+ decorate={(date) => ` • ${date}`}
+ />
+ </>
+ )}
+ </View>
+ <Text style={styles.replyText} numberOfLines={2}>
+ {post.in_reply_to.text}
</Text>
- {/* We're not displaying any images here in the container */}
- <DateLabel
- timestamp={post.in_reply_to.timestamp}
- type={'short'}
- decorate={(date) => ` • ${date}`}
- />
+ {post.in_reply_to.permalink && (
+ <Text
+ style={styles.replyShowThisThread}
+ onPress={() => {
+ if (post.in_reply_to?.permalink) {
+ Linking.openURL(post.in_reply_to?.permalink || '');
+ }
+ }}>
+ Show this thread
+ </Text>
+ )}
</View>
- <Text style={styles.replyText} numberOfLines={2}>
- {post.in_reply_to.text}
- </Text>
- <Text
- style={styles.replyShowThisThread}
- onPress={() => {
- if (post.in_reply_to?.permalink) {
- Linking.openURL(post.in_reply_to?.permalink || '');
- }
- }}>
- Show this thread
- </Text>
- </View>
- </LinearGradient>
- ) : (
- <React.Fragment />
- )}
+ </LinearGradient>
+ )}
</View>
{/* Footer */}
<View style={styles.footer}>
@@ -207,7 +211,7 @@ const styles = StyleSheet.create({
backgroundColor: '#1d0034',
},
replyGradient: {
- height: 150,
+ // height: 150,
borderRadius: 15,
justifyContent: 'center',
alignItems: 'center',
@@ -229,6 +233,7 @@ const styles = StyleSheet.create({
},
replyText: {
fontSize: 15,
+ marginVertical: 20,
color: 'white',
},
replyShowThisThread: {