Show "unplayed" dot on outgoing audio messages

This commit is contained in:
Evan Hahn 2021-07-27 10:42:25 -05:00 committed by GitHub
parent b73c029d5f
commit 14929fb408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 219 additions and 60 deletions

View file

@ -52,6 +52,7 @@ import {
isMessageJustForMe,
isRead,
isSent,
isViewed,
maxStatus,
someSendStatus,
} from '../../messages/MessageSendState';
@ -914,7 +915,7 @@ export function getMessagePropStatus(
if (hasErrors(message)) {
return sent ? 'partial-sent' : 'error';
}
return sent ? 'read' : 'sending';
return sent ? 'viewed' : 'sending';
}
const sendStates = Object.values(
@ -928,6 +929,9 @@ export function getMessagePropStatus(
if (hasErrors(message)) {
return isSent(highestSuccessfulStatus) ? 'partial-sent' : 'error';
}
if (isViewed(highestSuccessfulStatus)) {
return 'viewed';
}
if (isRead(highestSuccessfulStatus)) {
return 'read';
}