From cd7e740ab137fa618c6162a6aed294c8757760e9 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 9 Jan 2023 16:52:29 +0100 Subject: [PATCH] Fix remove reply level not showing up correctly --- src/screens/Tabs/Shared/Toot.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/screens/Tabs/Shared/Toot.tsx b/src/screens/Tabs/Shared/Toot.tsx index 5f078717..576bb249 100644 --- a/src/screens/Tabs/Shared/Toot.tsx +++ b/src/screens/Tabs/Shared/Toot.tsx @@ -257,7 +257,7 @@ const TabSharedToot: React.FC> = ({ } ) - const heights = useRef<(number | undefined)[]>([]) + const [heights, setHeights] = useState<{ [key: number]: number }>({}) const MAX_LEVEL = 10 const ARC = StyleConstants.Avatar.XS / 4 @@ -284,7 +284,7 @@ const TabSharedToot: React.FC> = ({ nativeEvent: { layout: { height } } - }) => (heights.current[index] = height)} + }) => setHeights({ ...heights, [index]: height })} > > = ({ d={ `M ${(i + 1) * StyleConstants.Spacing.S} 0 ` + `v ${ - (heights.current[index] || 999) - + (heights[index] || 999) - (StyleConstants.Spacing.S * 1.5 + StyleConstants.Font.Size.L) / 2 - StyleConstants.Avatar.XS / 2 } ` + @@ -347,7 +347,7 @@ const TabSharedToot: React.FC> = ({ d={ `M ${(i + 1) * StyleConstants.Spacing.S} 0 ` + `v ${ - (heights.current[index] || 999) - + (heights[index] || 999) - (StyleConstants.Spacing.S * 1.5 + StyleConstants.Font.Size.L * 1.35) / 2 @@ -355,7 +355,7 @@ const TabSharedToot: React.FC> = ({ `h ${ARC}` } strokeWidth={1} - stroke={colors.border} + stroke={colors.red} strokeOpacity={0.6} /> @@ -375,7 +375,7 @@ const TabSharedToot: React.FC> = ({ } }) : null} - {/* @@ -386,7 +386,7 @@ const TabSharedToot: React.FC> = ({ */} + /> ) }}