diff --git a/ts/components/conversation/message/ClickToTrustSender.tsx b/ts/components/conversation/message/ClickToTrustSender.tsx index 33b40c39f3..f7ecd86f91 100644 --- a/ts/components/conversation/message/ClickToTrustSender.tsx +++ b/ts/components/conversation/message/ClickToTrustSender.tsx @@ -8,7 +8,7 @@ import { SessionIcon } from '../../session/icon'; import { SessionButtonColor } from '../../session/SessionButton'; const StyledTrustSenderUI = styled.div` - padding: 'var(--margins-md)'; + padding-inline: var(--margins-xs); display: flex; align-items: center; `; @@ -16,6 +16,7 @@ const StyledTrustSenderUI = styled.div` const ClickToDownload = styled.div` cursor: pointer; padding: var(--margins-xs) var(--margins-md); + white-space: nowrap; `; export const ClickToTrustSender = (props: { messageId: string }) => { diff --git a/ts/components/conversation/message/MessageContentWithStatus.tsx b/ts/components/conversation/message/MessageContentWithStatus.tsx index ac98961126..d2b330e442 100644 --- a/ts/components/conversation/message/MessageContentWithStatus.tsx +++ b/ts/components/conversation/message/MessageContentWithStatus.tsx @@ -15,7 +15,7 @@ import { MessageStatus } from './MessageStatus'; export type MessageContentWithStatusSelectorProps = Pick< MessageRenderingProps, - 'direction' | 'isDeleted' + 'direction' | 'isDeleted' | 'isTrustedForAttachmentDownload' > & { hasAttachments: boolean }; type Props = { @@ -48,7 +48,7 @@ export const MessageContentWithStatuses = (props: Props) => { if (!contentProps) { return null; } - const { direction, isDeleted, hasAttachments } = contentProps; + const { direction, isDeleted, hasAttachments, isTrustedForAttachmentDownload } = contentProps; const isIncoming = direction === 'incoming'; return ( @@ -56,7 +56,7 @@ export const MessageContentWithStatuses = (props: Props) => { className={classNames('module-message', `module-message--${direction}`)} role="button" onClick={onClickOnMessageOuterContainer} - style={{ width: hasAttachments ? 'min-content' : 'auto' }} + style={{ width: hasAttachments && isTrustedForAttachmentDownload ? 'min-content' : 'auto' }} >
diff --git a/ts/state/selectors/conversations.ts b/ts/state/selectors/conversations.ts index 4b5614aa7c..41f1cdd0c7 100644 --- a/ts/state/selectors/conversations.ts +++ b/ts/state/selectors/conversations.ts @@ -1023,12 +1023,18 @@ export const getMessageContentWithStatusesSelectorProps = createSelector( return undefined; } - const { direction, isDeleted, attachments } = props.propsForMessage; + const { + direction, + isDeleted, + attachments, + isTrustedForAttachmentDownload, + } = props.propsForMessage; const msgProps: MessageContentWithStatusSelectorProps = { direction, isDeleted, hasAttachments: Boolean(attachments?.length) || false, + isTrustedForAttachmentDownload, }; return msgProps;