Truncate post metrics and fix truncation on native (#4575)
* truncate post counts * add numberformat polyfill * Fix perf * Simplify type shenanigans * Bump versions to remove dupes --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
parent
ca17cf276f
commit
22c5aa4da4
6 changed files with 68 additions and 49 deletions
|
|
@ -39,6 +39,7 @@ import {
|
|||
} from '#/components/icons/Heart2'
|
||||
import * as Prompt from '#/components/Prompt'
|
||||
import {PostDropdownBtn} from '../forms/PostDropdownBtn'
|
||||
import {formatCount} from '../numeric/format'
|
||||
import {Text} from '../text/Text'
|
||||
import {RepostButton} from './RepostButton'
|
||||
|
||||
|
|
@ -226,7 +227,7 @@ let PostCtrls = ({
|
|||
big ? a.text_md : {fontSize: 15},
|
||||
a.user_select_none,
|
||||
]}>
|
||||
{post.replyCount}
|
||||
{formatCount(post.replyCount)}
|
||||
</Text>
|
||||
) : undefined}
|
||||
</Pressable>
|
||||
|
|
@ -278,7 +279,7 @@ let PostCtrls = ({
|
|||
: defaultCtrlColor,
|
||||
],
|
||||
]}>
|
||||
{post.likeCount}
|
||||
{formatCount(post.likeCount)}
|
||||
</Text>
|
||||
) : undefined}
|
||||
</Pressable>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue