Message: Fix jumping width when selecting (#1367)
This commit is contained in:
parent
33c6beb051
commit
d632c3ec2c
@ -294,11 +294,9 @@ const Message: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
!(isContextMenuShown || isInSelectMode || isForwarding)
|
!(isContextMenuShown || isInSelectMode || isForwarding)
|
||||||
&& (!isInDocumentGroup || isLastInDocumentGroup)
|
&& (!isInDocumentGroup || isLastInDocumentGroup)
|
||||||
);
|
);
|
||||||
const canForward = canShowActionButton && isChannel && !isScheduled;
|
const canForward = isChannel && !isScheduled;
|
||||||
const canFocus = Boolean(canShowActionButton && (
|
const canFocus = Boolean(isPinnedList
|
||||||
(forwardInfo && (forwardInfo.isChannelPost || (isChatWithSelf && !isOwn)) && forwardInfo.fromMessageId)
|
|| (forwardInfo && (forwardInfo.isChannelPost || (isChatWithSelf && !isOwn)) && forwardInfo.fromMessageId));
|
||||||
|| isPinnedList
|
|
||||||
));
|
|
||||||
const avatarPeer = forwardInfo && (isChatWithSelf || !sender) ? originSender : sender;
|
const avatarPeer = forwardInfo && (isChatWithSelf || !sender) ? originSender : sender;
|
||||||
const senderPeer = forwardInfo ? originSender : sender;
|
const senderPeer = forwardInfo ? originSender : sender;
|
||||||
|
|
||||||
@ -841,7 +839,7 @@ const Message: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
onClick={handleMessageSelect}
|
onClick={handleMessageSelect}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{canForward ? (
|
{canShowActionButton && canForward ? (
|
||||||
<Button
|
<Button
|
||||||
className="message-action-button"
|
className="message-action-button"
|
||||||
color="translucent-white"
|
color="translucent-white"
|
||||||
@ -852,7 +850,7 @@ const Message: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
>
|
>
|
||||||
<i className="icon-share-filled" />
|
<i className="icon-share-filled" />
|
||||||
</Button>
|
</Button>
|
||||||
) : canFocus ? (
|
) : canShowActionButton && canFocus ? (
|
||||||
<Button
|
<Button
|
||||||
className="message-action-button"
|
className="message-action-button"
|
||||||
color="translucent-white"
|
color="translucent-white"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user