MessageDetails: contact status fallbacks to message status

this is used for medium groups
This commit is contained in:
Audric Ackermann 2020-11-25 13:25:08 +11:00
parent 80523a9a3e
commit 22b4f39e52
No known key found for this signature in database
GPG key ID: 999F434D76324AD4
4 changed files with 9 additions and 1 deletions

View file

@ -860,7 +860,9 @@
: `${contact.profileName} (Secondary Device)`;
return {
...contact,
status: this.getStatus(id),
// fallback to the message status if we do not have a status with a user
// this is useful for medium groups.
status: this.getStatus(id) || this.getMessagePropStatus(),
errors: errorsForContact,
isOutgoingKeyError,
isUnidentifiedDelivery,

View file

@ -1212,6 +1212,8 @@
}
.module-message-detail__contact__status-icon {
min-width: 12px;
min-height: 12px;
width: 12px;
height: 12px;
display: inline-block;

View file

@ -833,6 +833,7 @@ export class SessionConversation extends React.Component<Props, State> {
private async showMessageDetails(messageProps: any) {
messageProps.onDeleteMessage = (id: string) => {
this.deleteMessage(id);
this.setState({ messageDetailShowProps: undefined });
};
this.setState({ messageDetailShowProps: messageProps });
}

View file

@ -407,6 +407,9 @@ const toPickFromMessageModel = [
'findContact',
'isUnidentifiedDelivery',
'getStatus',
'getMessagePropStatus',
'hasErrors',
'isOutgoing',
];
function getEmptyState(): ConversationsStateType {