1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-04-10 12:13:54 +02:00
parent d4b28df091
commit 933324a2d8
4 changed files with 7 additions and 4 deletions

View File

@ -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)
}
}, [])