From 4cf2a1be34de1fcbbf50c9685aee804a14fea608 Mon Sep 17 00:00:00 2001 From: Otavio Stasiak Date: Thu, 19 Sep 2024 19:37:34 -0300 Subject: [PATCH 1/2] fix: update thumb message layout --- .../message/Components/Attachments/Reply.tsx | 58 +++++++++++-------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/app/containers/message/Components/Attachments/Reply.tsx b/app/containers/message/Components/Attachments/Reply.tsx index eb374a5beb..1acb1788b1 100644 --- a/app/containers/message/Components/Attachments/Reply.tsx +++ b/app/containers/message/Components/Attachments/Reply.tsx @@ -30,7 +30,7 @@ const styles = StyleSheet.create({ attachmentContainer: { flex: 1, borderRadius: 4, - flexDirection: 'column', + flexDirection: 'row', paddingVertical: 4, paddingLeft: 8 }, @@ -43,6 +43,11 @@ const styles = StyleSheet.create({ alignItems: 'center', marginBottom: 8 }, + titleAndDesciptionContainer: { + flexDirection: "column", + flex: 1, + width: 200 + }, author: { fontSize: 16, ...sharedStyles.textMedium, @@ -72,11 +77,12 @@ const styles = StyleSheet.create({ marginBottom: 4 }, image: { - height: 200, - flex: 1, + height: 80, + width: 80, borderTopLeftRadius: 4, borderTopRightRadius: 4, - marginBottom: 1 + marginBottom: 1, + marginLeft: 20 }, title: { flex: 1, @@ -245,28 +251,30 @@ const Reply = React.memo( background={Touchable.Ripple(themes[theme].surfaceNeutral)} disabled={!!(loading || attachment.message_link)}> - - <Description attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} /> + <View style={styles.titleAndDesciptionContainer}> + <Title attachment={attachment} timeFormat={timeFormat} theme={theme} /> + <Description attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} /> + <Attachments + attachments={attachment.attachments} + getCustomEmoji={getCustomEmoji} + timeFormat={timeFormat} + style={[{ color: themes[theme].fontHint, fontSize: 14, marginBottom: 8 }]} + isReply + showAttachment={showAttachment} + /> + <Fields attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} /> + {loading ? ( + <View style={[styles.backdrop]}> + <View + style={[ + styles.backdrop, + { backgroundColor: themes[theme].surfaceNeutral, opacity: themes[theme].attachmentLoadingOpacity } + ]}></View> + <RCActivityIndicator /> + </View> + ) : null} + </View> <UrlImage image={attachment.thumb_url} /> - <Attachments - attachments={attachment.attachments} - getCustomEmoji={getCustomEmoji} - timeFormat={timeFormat} - style={[{ color: themes[theme].fontHint, fontSize: 14, marginBottom: 8 }]} - isReply - showAttachment={showAttachment} - /> - <Fields attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} /> - {loading ? ( - <View style={[styles.backdrop]}> - <View - style={[ - styles.backdrop, - { backgroundColor: themes[theme].surfaceNeutral, opacity: themes[theme].attachmentLoadingOpacity } - ]}></View> - <RCActivityIndicator /> - </View> - ) : null} </View> </Touchable> <Markdown msg={msg} username={user.username} getCustomEmoji={getCustomEmoji} theme={theme} /> From ada0c29a345026b5241979567259a0ec2d0adf92 Mon Sep 17 00:00:00 2001 From: OtavioStasiak <otaviostasiakmusic@outlook.com> Date: Thu, 10 Oct 2024 12:50:55 -0300 Subject: [PATCH 2/2] minor changes --- app/containers/message/Components/Attachments/Reply.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/containers/message/Components/Attachments/Reply.tsx b/app/containers/message/Components/Attachments/Reply.tsx index 1acb1788b1..0ba0e88d0e 100644 --- a/app/containers/message/Components/Attachments/Reply.tsx +++ b/app/containers/message/Components/Attachments/Reply.tsx @@ -43,8 +43,8 @@ const styles = StyleSheet.create({ alignItems: 'center', marginBottom: 8 }, - titleAndDesciptionContainer: { - flexDirection: "column", + titleAndDescriptionContainer: { + flexDirection: 'column', flex: 1, width: 200 }, @@ -251,7 +251,7 @@ const Reply = React.memo( background={Touchable.Ripple(themes[theme].surfaceNeutral)} disabled={!!(loading || attachment.message_link)}> <View style={styles.attachmentContainer}> - <View style={styles.titleAndDesciptionContainer}> + <View style={styles.titleAndDescriptionContainer}> <Title attachment={attachment} timeFormat={timeFormat} theme={theme} /> <Description attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} /> <Attachments