diff --git a/ts/components/conversationList/BaseConversationListItem.tsx b/ts/components/conversationList/BaseConversationListItem.tsx index c33ba8fca..10d7dc954 100644 --- a/ts/components/conversationList/BaseConversationListItem.tsx +++ b/ts/components/conversationList/BaseConversationListItem.tsx @@ -138,7 +138,7 @@ export const BaseConversationListItem: FunctionComponent = React.memo /> {isUnread && (
- {unreadCount || ''} + {formatUnreadCount(unreadCount)}
)} @@ -233,3 +233,13 @@ export const BaseConversationListItem: FunctionComponent = React.memo ); } ); + +function formatUnreadCount(count: undefined | number): string { + if (!count) { + return ''; + } + if (count >= 99) { + return '99+'; + } + return String(count); +}