From be3facb98fcf674229b1bb8dea86eff38f95fc0e Mon Sep 17 00:00:00 2001 From: Saket Mahajan Date: Fri, 9 Oct 2020 23:50:31 +0530 Subject: [PATCH] Fixed the issue #2531 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. --- app/containers/message/Reply.js | 49 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js index d67f656bd3..a75d695c85 100644 --- a/app/containers/message/Reply.js +++ b/app/containers/message/Reply.js @@ -147,29 +147,32 @@ const Reply = React.memo(({ }; return ( - 0 && styles.marginTop, - { - backgroundColor: themes[theme].chatComponentBackground, - borderColor: themes[theme].borderColor - } - ]} - background={Touchable.Ripple(themes[theme].bannerBackground)} - > - - - <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);