mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
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)
|
||||
&& (!isInDocumentGroup || isLastInDocumentGroup)
|
||||
);
|
||||
const canForward = canShowActionButton && isChannel && !isScheduled;
|
||||
const canFocus = Boolean(canShowActionButton && (
|
||||
(forwardInfo && (forwardInfo.isChannelPost || (isChatWithSelf && !isOwn)) && forwardInfo.fromMessageId)
|
||||
|| isPinnedList
|
||||
));
|
||||
const canForward = isChannel && !isScheduled;
|
||||
const canFocus = Boolean(isPinnedList
|
||||
|| (forwardInfo && (forwardInfo.isChannelPost || (isChatWithSelf && !isOwn)) && forwardInfo.fromMessageId));
|
||||
const avatarPeer = forwardInfo && (isChatWithSelf || !sender) ? originSender : sender;
|
||||
const senderPeer = forwardInfo ? originSender : sender;
|
||||
|
||||
@ -841,7 +839,7 @@ const Message: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
onClick={handleMessageSelect}
|
||||
/>
|
||||
)}
|
||||
{canForward ? (
|
||||
{canShowActionButton && canForward ? (
|
||||
<Button
|
||||
className="message-action-button"
|
||||
color="translucent-white"
|
||||
@ -852,7 +850,7 @@ const Message: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
>
|
||||
<i className="icon-share-filled" />
|
||||
</Button>
|
||||
) : canFocus ? (
|
||||
) : canShowActionButton && canFocus ? (
|
||||
<Button
|
||||
className="message-action-button"
|
||||
color="translucent-white"
|
||||
|
Loading…
x
Reference in New Issue
Block a user