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

@ -51,6 +51,8 @@ const STATUS_NUMBERS: Record<SendStatus, number> = {
export const maxStatus = (a: SendStatus, b: SendStatus): SendStatus =>
STATUS_NUMBERS[a] > STATUS_NUMBERS[b] ? a : b;
export const isViewed = (status: SendStatus): boolean =>
status === SendStatus.Viewed;
export const isRead = (status: SendStatus): boolean =>
STATUS_NUMBERS[status] >= STATUS_NUMBERS[SendStatus.Read];
export const isDelivered = (status: SendStatus): boolean =>