mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
More chat list unread count tweaks
This commit is contained in:
@@ -327,7 +327,7 @@ story.add('Contact checkboxes: disabled', () => (
|
||||
story.add('Conversations: unread count', () => (
|
||||
<ConversationList
|
||||
{...createProps(
|
||||
[4, 10, 250].map(unreadCount => ({
|
||||
[4, 10, 34, 250].map(unreadCount => ({
|
||||
type: RowType.Conversation,
|
||||
conversation: createConversation({
|
||||
lastMessage: {
|
||||
|
||||
@@ -234,10 +234,11 @@ export const BaseConversationListItem: FunctionComponent<PropsType> = React.memo
|
||||
function UnreadCount({ count = 0 }: Readonly<{ count?: number }>) {
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
`${BASE_CLASS_NAME}__unread-count`,
|
||||
count > 99 && `${BASE_CLASS_NAME}__unread-count--big`
|
||||
)}
|
||||
className={classNames(`${BASE_CLASS_NAME}__unread-count`, {
|
||||
[`${BASE_CLASS_NAME}__unread-count--multiple-digits`]:
|
||||
count > 9 && count <= 99,
|
||||
[`${BASE_CLASS_NAME}__unread-count--many`]: count > 99,
|
||||
})}
|
||||
>
|
||||
{Boolean(count) && Math.min(count, 99)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user