Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update thumb message layout #5872

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 33 additions & 25 deletions app/containers/message/Components/Attachments/Reply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const styles = StyleSheet.create({
attachmentContainer: {
flex: 1,
borderRadius: 4,
flexDirection: 'column',
flexDirection: 'row',
paddingVertical: 4,
paddingLeft: 8
},
Expand All @@ -43,6 +43,11 @@ const styles = StyleSheet.create({
alignItems: 'center',
marginBottom: 8
},
titleAndDescriptionContainer: {
flexDirection: 'column',
flex: 1,
width: 200
},
author: {
fontSize: 16,
...sharedStyles.textMedium,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -245,28 +251,30 @@ const Reply = React.memo(
background={Touchable.Ripple(themes[theme].surfaceNeutral)}
disabled={!!(loading || attachment.message_link)}>
<View style={styles.attachmentContainer}>
<Title attachment={attachment} timeFormat={timeFormat} theme={theme} />
<Description attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} />
<View style={styles.titleAndDescriptionContainer}>
<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} />
Expand Down