Merge pull request #1989 from Bilb/disable-settings-video-feature-off
make sure click to trust sender renders without new lines
This commit is contained in:
commit
151d4884f8
|
@ -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 }) => {
|
||||
|
|
|
@ -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' }}
|
||||
>
|
||||
<MessageStatus messageId={messageId} isCorrectSide={isIncoming} />
|
||||
<div>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue