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

@ -25,6 +25,7 @@ export type Props = {
expirationLength?: number;
expirationTimestamp?: number;
id: string;
played: boolean;
showMessageDetail: (id: string) => void;
status?: MessageStatusType;
textPending?: boolean;
@ -153,6 +154,7 @@ export const MessageAudio: React.FC<Props> = (props: Props) => {
expirationLength,
expirationTimestamp,
id,
played,
showMessageDetail,
status,
textPending,
@ -531,7 +533,14 @@ export const MessageAudio: React.FC<Props> = (props: Props) => {
timestamp={timestamp}
/>
)}
<div className={`${CSS_BASE}__countdown`}>{timeToText(countDown)}</div>
<div
className={classNames(
`${CSS_BASE}__countdown`,
`${CSS_BASE}__countdown--${played ? 'played' : 'unplayed'}`
)}
>
{timeToText(countDown)}
</div>
</div>
);