Message Context Menu: Fix jumping width (#1758)

This commit is contained in:
Alexander Zinchuk 2022-03-11 13:51:20 +01:00
parent bd507a328f
commit bd2d21581d
2 changed files with 24 additions and 13 deletions

View File

@ -29,7 +29,13 @@
}
&--seen-by {
min-width: 14rem;
max-width: 14rem;
}
&--seen-by-label {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.avatars {

View File

@ -255,18 +255,23 @@ const MessageContextMenu: FC<OwnProps> = ({
onClick={canShowReactionsCount ? onShowReactors : onShowSeenBy}
disabled={!canShowReactionsCount && !message.seenByUserIds?.length}
>
{canShowReactionsCount && message.reactors?.count ? (
canShowSeenBy && message.seenByUserIds?.length
? lang('Chat.OutgoingContextMixedReactionCount', [message.reactors.count, message.seenByUserIds.length])
: lang('Chat.ContextReactionCount', message.reactors.count, 'i')
) : (
message.seenByUserIds?.length === 1 && seenByRecentUsers
? getUserFullName(seenByRecentUsers[0])
: (message.seenByUserIds?.length
? lang('Conversation.ContextMenuSeen', message.seenByUserIds.length, 'i')
: lang('Conversation.ContextMenuNoViews')
)
)}
<span className="MessageContextMenu--seen-by-label">
{canShowReactionsCount && message.reactors?.count ? (
canShowSeenBy && message.seenByUserIds?.length
? lang(
'Chat.OutgoingContextMixedReactionCount',
[message.reactors.count, message.seenByUserIds.length],
)
: lang('Chat.ContextReactionCount', message.reactors.count, 'i')
) : (
message.seenByUserIds?.length === 1 && seenByRecentUsers
? getUserFullName(seenByRecentUsers[0])
: (message.seenByUserIds?.length
? lang('Conversation.ContextMenuSeen', message.seenByUserIds.length, 'i')
: lang('Conversation.ContextMenuNoViews')
)
)}
</span>
<div className="avatars">
{seenByRecentUsers?.map((user) => (
<Avatar