diff options
-rw-r--r-- | src/components/notifications/Notification.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx index 2bcee89e..761ea950 100644 --- a/src/components/notifications/Notification.tsx +++ b/src/components/notifications/Notification.tsx @@ -42,6 +42,7 @@ const Notification: React.FC<NotificationProps> = (props) => { const [avatarURI, setAvatarURI] = useState<string | undefined>(undefined); const [momentURI, setMomentURI] = useState<string | undefined>(undefined); const backgroundColor = unread ? '#DCF1F1' : 'rgba(0,0,0,0)'; + const contentRightMargin = notification_type === 'CMT' ? '15%' : 0; useEffect(() => { let mounted = true; @@ -121,22 +122,20 @@ const Notification: React.FC<NotificationProps> = (props) => { style={styles.avatar} source={ avatarURI - ? {uri: avatarURI, cache: 'only-if-cached'} + ? {uri: avatarURI} : require('../../assets/images/avatar-placeholder.png') } /> </View> - <View style={styles.contentContainer}> + <View + style={[styles.contentContainer, {marginRight: contentRightMargin}]}> <Text style={styles.actorName}> {first_name} {last_name} </Text> <Text>{verbage}</Text> </View> {notification_type === 'CMT' && notification_object && ( - <Image - style={styles.moment} - source={{uri: momentURI, cache: 'only-if-cached'}} - /> + <Image style={styles.moment} source={{uri: momentURI}} /> )} </TouchableWithoutFeedback> ); |