Replace "Forwarded from" with an icon.

This commit is contained in:
aforge
2021-09-23 20:07:21 +03:00
parent 3a7a806420
commit fb3fae8c9b
7 changed files with 41 additions and 17 deletions
+3
View File
@@ -77,6 +77,7 @@ class ContactList extends React.Component {
const comment = Array.isArray(c.private) ?
c.private.join(',') : (c.private ? c.private.comment : null);
let preview;
let forwarded;
let deliveryStatus;
if (!this.props.showMode && c.latestMessage) {
const msg = c.latestMessage(true);
@@ -85,6 +86,7 @@ class ContactList extends React.Component {
preview = typeof msg.content == 'string' ?
msg.content.substr(0, MESSAGE_PREVIEW_LENGTH) :
Drafty.preview(msg.content, MESSAGE_PREVIEW_LENGTH);
forwarded = msg.head ? msg.head.forwarded : undefined;
}
}
contactNodes.push(
@@ -94,6 +96,7 @@ class ContactList extends React.Component {
avatar={makeImageUrl(c.public ? c.public.photo : null)}
comment={comment}
preview={preview}
forwarded={forwarded}
received={deliveryStatus}
unread={this.props.showUnread ? c.unread : 0}
now={c.online && this.props.connected}