Added last-message's author to group conversation list in left pane
This commit is contained in:
parent
eadef45290
commit
ca6300a86a
8 changed files with 45 additions and 5 deletions
|
@ -27,6 +27,7 @@ type OpenConversationActionType = (
|
|||
export type Props = {
|
||||
direction?: 'incoming' | 'outgoing';
|
||||
text: string;
|
||||
author?: string;
|
||||
textAttachment?: Pick<AttachmentType, 'pending' | 'digest' | 'key'>;
|
||||
/** If set, all emoji will be the same size. Otherwise, just one emoji will be large. */
|
||||
disableJumbomoji?: boolean;
|
||||
|
@ -74,6 +75,7 @@ export function MessageBody({
|
|||
onIncreaseTextLength,
|
||||
openConversation,
|
||||
text,
|
||||
author,
|
||||
textAttachment,
|
||||
kickOffBodyDownload,
|
||||
}: Props): JSX.Element {
|
||||
|
@ -144,6 +146,20 @@ export function MessageBody({
|
|||
|
||||
return (
|
||||
<span>
|
||||
{author && (
|
||||
<>
|
||||
<span className="MessageBody__author">
|
||||
{renderEmoji({
|
||||
i18n,
|
||||
text: author,
|
||||
sizeClass,
|
||||
key: 0,
|
||||
renderNonEmoji: renderNewLines,
|
||||
})}
|
||||
</span>
|
||||
:{' '}
|
||||
</>
|
||||
)}
|
||||
{disableLinks ? (
|
||||
renderEmoji({
|
||||
i18n,
|
||||
|
|
|
@ -148,6 +148,7 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
|
|||
messageText = (
|
||||
<MessageBody
|
||||
text={truncateMessageText(lastMessage.text)}
|
||||
author={type === 'group' ? lastMessage.author : undefined}
|
||||
disableJumbomoji
|
||||
disableLinks
|
||||
i18n={i18n}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue