Skip to content
Open
Show file tree
Hide file tree
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
40 changes: 35 additions & 5 deletions app/containers/message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import translationLanguages from '../../lib/constants/translationLanguages';
const MessageInner = React.memo((props: IMessageInner) => {
const { isLargeFontScale } = useResponsiveLayout();
const showTimeLarge = isLargeFontScale && props.isHeader;
const hasLinkedQuote = props.attachments?.some(file => !!file?.message_link) ?? false;

let content;
if (props.isPreview) {
Expand All @@ -39,8 +40,17 @@ const MessageInner = React.memo((props: IMessageInner) => {
<User {...props} />
{showTimeLarge ? <MessageTime {...props} /> : null}
<>
<Quote {...props} />
<Content {...props} />
{hasLinkedQuote ? (
<>
<Quote {...props} />
<Content {...props} />
</>
) : (
<>
<Content {...props} />
<Quote {...props} />
</>
)}
<Attachments {...props} />
</>
<Urls {...props} />
Expand Down Expand Up @@ -87,8 +97,17 @@ const MessageInner = React.memo((props: IMessageInner) => {
<User {...props} />
{showTimeLarge ? <MessageTime {...props} /> : null}
<View style={{ gap: 4 }}>
<Quote {...props} />
<Content {...props} />
{hasLinkedQuote ? (
<>
<Quote {...props} />
<Content {...props} />
</>
) : (
<>
<Content {...props} />
<Quote {...props} />
</>
)}
<Attachments {...props} />
<Urls {...props} />
<Thread {...props} />
Expand Down Expand Up @@ -158,6 +177,7 @@ const Message = React.memo((props: IMessageTouchable & IMessage) => {
const thread = props.isThreadReply ? <RepliedThread {...props} /> : null;
// Prevent misalignment of info when the font size is increased.
const infoStyle: ViewStyle = props.isInfo ? { alignItems: 'center' } : {};
const hasLinkedQuote = props.attachments?.some(file => !!file?.message_link) ?? false;
return (
<View style={[styles.container, { marginTop: 4 }]}>
{thread}
Expand All @@ -169,7 +189,17 @@ const Message = React.memo((props: IMessageTouchable & IMessage) => {
accessibilityLanguage={props.autoTranslateLanguage}
index={2}>
<View style={styles.messageContent}>
<Content {...props} />
{hasLinkedQuote ? (
<>
<Quote {...props} />
<Content {...props} />
</>
) : (
<>
<Content {...props} />
<Quote {...props} />
</>
)}
{props.isInfo && props.type === 'message_pinned' ? (
<View pointerEvents='none'>
<Attachments {...props} />
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3197,9 +3197,9 @@ SPEC CHECKSUMS:
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
WatermelonDB: 4c846c8cb94eef3cba90fa034d15310163226703
Yoga: dfabf1234ccd5ac41d1b1d43179f024366ae9831
Yoga: 2a3a4c38a8441b6359d5e5914d35db7b2b67aebd
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: 4c73563b34520b90c036817cdb9ccf65fea5f5c5

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
8 changes: 4 additions & 4 deletions ios/RocketChatRN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@
inputFileListPaths = (
);
inputPaths = (
"$TARGET_BUILD_DIR/$INFOPLIST_PATH",
$TARGET_BUILD_DIR/$INFOPLIST_PATH,
);
name = "Upload source maps to Bugsnag";
outputFileListPaths = (
Expand Down Expand Up @@ -1820,7 +1820,7 @@
inputFileListPaths = (
);
inputPaths = (
"$TARGET_BUILD_DIR/$INFOPLIST_PATH",
$TARGET_BUILD_DIR/$INFOPLIST_PATH,
);
name = "Upload source maps to Bugsnag";
outputFileListPaths = (
Expand Down Expand Up @@ -2602,7 +2602,7 @@
"$(inherited)",
"$(SRCROOT)/../node_modules/rn-extensions-share/ios/**",
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**",
"$PODS_CONFIGURATION_BUILD_DIR/Firebase",
$PODS_CONFIGURATION_BUILD_DIR/Firebase,
"$(SRCROOT)/../node_modules/react-native-mmkv-storage/ios/**",
);
INFOPLIST_FILE = ShareRocketChatRN/Info.plist;
Expand Down Expand Up @@ -2679,7 +2679,7 @@
"$(inherited)",
"$(SRCROOT)/../node_modules/rn-extensions-share/ios/**",
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**",
"$PODS_CONFIGURATION_BUILD_DIR/Firebase",
$PODS_CONFIGURATION_BUILD_DIR/Firebase,
"$(SRCROOT)/../node_modules/react-native-mmkv-storage/ios/**",
);
INFOPLIST_FILE = ShareRocketChatRN/Info.plist;
Expand Down