diff options
Diffstat (limited to 'src/view/com/post-thread')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 6 | ||||
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 69b26ad44..a52818fd1 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -371,11 +371,11 @@ export function PostThread({ ], ) - if (error || !thread) { + if (!thread || !preferences || error) { return ( <ListMaybePlaceholder - isLoading={(!preferences || !thread) && !error} - isError={!!error} + isLoading={!error} + isError={Boolean(error)} noEmpty onRetry={refetch} errorTitle={error?.title} diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index cfb8bd93f..f644a5366 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -8,7 +8,7 @@ import { RichText as RichTextAPI, } from '@atproto/api' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {msg, Trans} from '@lingui/macro' +import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' @@ -24,7 +24,7 @@ import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {makeProfileLink} from 'lib/routes/links' import {sanitizeDisplayName} from 'lib/strings/display-names' import {sanitizeHandle} from 'lib/strings/handles' -import {countLines, pluralize} from 'lib/strings/helpers' +import {countLines} from 'lib/strings/helpers' import {niceDate} from 'lib/strings/time' import {s} from 'lib/styles' import {isWeb} from 'platform/detection' @@ -336,7 +336,11 @@ let PostThreadItemLoaded = ({ <Text type="xl-bold" style={pal.text}> {formatCount(post.repostCount)} </Text>{' '} - {pluralize(post.repostCount, 'repost')} + <Plural + value={post.repostCount} + one="repost" + other="reposts" + /> </Text> </Link> ) : null} @@ -352,7 +356,7 @@ let PostThreadItemLoaded = ({ <Text type="xl-bold" style={pal.text}> {formatCount(post.likeCount)} </Text>{' '} - {pluralize(post.likeCount, 'like')} + <Plural value={post.likeCount} one="like" other="likes" /> </Text> </Link> ) : null} |