Skip to content

Commit

Permalink
Fixed the issue RocketChat#2531
Browse files Browse the repository at this point in the history
In app/containers/message/Reply.js added a View Contaier around the
Attachment Touchable and Added a Markdown attribute with msg set to
description of attachment to display the message if any.
  • Loading branch information
saket-m0 committed Oct 9, 2020
1 parent 91ad210 commit be3facb
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions app/containers/message/Reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,29 +147,32 @@ const Reply = React.memo(({
};

return (
<Touchable
onPress={onPress}
style={[
styles.button,
index > 0 && styles.marginTop,
{
backgroundColor: themes[theme].chatComponentBackground,
borderColor: themes[theme].borderColor
}
]}
background={Touchable.Ripple(themes[theme].bannerBackground)}
>
<View style={styles.attachmentContainer}>
<Title attachment={attachment} timeFormat={timeFormat} theme={theme} />
<Description
attachment={attachment}
timeFormat={timeFormat}
getCustomEmoji={getCustomEmoji}
theme={theme}
/>
<Fields attachment={attachment} theme={theme} />
</View>
</Touchable>
<View>
<Touchable
onPress={onPress}
style={[
styles.button,
index > 0 && styles.marginTop,
{
backgroundColor: themes[theme].chatComponentBackground,
borderColor: themes[theme].borderColor
}
]}
background={Touchable.Ripple(themes[theme].bannerBackground)}
>
<View style={styles.attachmentContainer}>
<Title attachment={attachment} timeFormat={timeFormat} theme={theme} />
<Description
attachment={attachment}
timeFormat={timeFormat}
getCustomEmoji={getCustomEmoji}
theme={theme}
/>
<Fields attachment={attachment} theme={theme} />
</View>
</Touchable>
<Markdown msg={attachment.description} theme={theme} />
</View>
);
}, (prevProps, nextProps) => isEqual(prevProps.attachment, nextProps.attachment) && prevProps.theme === nextProps.theme);

Expand Down

0 comments on commit be3facb

Please sign in to comment.