From 933324a2d82f26c24793672689935b717d7b8987 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 10 Apr 2021 12:13:54 +0200 Subject: [PATCH] Fix CW --- src/components/Parse/HTML.tsx | 5 ++++- src/components/Timeline/Shared/Content.tsx | 2 +- src/i18n/en/screens/compose.json | 2 +- src/i18n/en/screens/tabs.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index 94326c22..4fe24ef8 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -236,7 +236,10 @@ const ParseHTML = React.memo( const [expanded, setExpanded] = useState(false) const onTextLayout = useCallback(({ nativeEvent }) => { - if (nativeEvent.lines.length >= numberOfLines + 5) { + if ( + numberOfLines === 0 || + nativeEvent.lines.length >= numberOfLines + 5 + ) { setExpandAllow(true) } }, []) diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index c23bdeba..63883b49 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -39,7 +39,7 @@ const TimelineContent = React.memo( emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={1} + numberOfLines={0} expandHint={t('shared.content.expandHint')} disableDetails={disableDetails} /> diff --git a/src/i18n/en/screens/compose.json b/src/i18n/en/screens/compose.json index 97dd7bf1..ba3e02f3 100644 --- a/src/i18n/en/screens/compose.json +++ b/src/i18n/en/screens/compose.json @@ -62,7 +62,7 @@ "poll": { "option": { "placeholder": { - "accessibilityLabel": "Field number {{index}}", + "accessibilityLabel": "Poll option {{index}}", "single": "Single choice", "multiple": "Multiple choice" } diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index 39caf81a..819f7bf6 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -189,7 +189,7 @@ "account": { "actions": { "accessibilityLabel": "Actions for user {{user}}", - "accessibilityHint": "You can mute, blokc, report or share this user" + "accessibilityHint": "You can mute, block, report or share this user" }, "moved": "User moved", "created_at": "Registered on: {{date}}",