Clean it up

This commit is contained in:
Eric Bailey
2025-05-29 15:52:54 -05:00
parent 24b6b9ea56
commit 98711ebc2b
6 changed files with 171 additions and 118 deletions
+21 -17
View File
@@ -24,25 +24,25 @@ export function ReadMore({
const t = useTheme()
const {_} = useLingui()
const isTreeView = view === 'tree'
const indent = Math.max(0, item.indent - 1)
const indent = Math.max(0, item.depth - 1)
const spacers = isTreeView
? Array.from(Array(indent)).map((_, n: number) => {
const isSkipped = item.skippedIndents.has(n)
return (
<View
key={`${item.key}-padding-${n}`}
style={[
t.atoms.border_contrast_low,
{
borderRightWidth: isSkipped ? 0 : REPLY_LINE_WIDTH,
width: TREE_INDENT + TREE_AVI_WIDTH / 2,
left: 1,
},
]}
/>
)
})
const isSkipped = item.skippedIndentIndices.has(n)
return (
<View
key={`${item.key}-padding-${n}`}
style={[
t.atoms.border_contrast_low,
{
borderRightWidth: isSkipped ? 0 : REPLY_LINE_WIDTH,
width: TREE_INDENT + TREE_AVI_WIDTH / 2,
left: 1,
},
]}
/>
)
})
: null
return (
@@ -79,7 +79,11 @@ export function ReadMore({
]}>
<Trans>
Read {item.moreReplies} more{' '}
<Plural one="reply" other="replies" value={item.moreReplies} />
<Plural
one="reply"
other="replies"
value={item.moreReplies}
/>
</Trans>
</Text>
</>
@@ -193,7 +193,7 @@ let PostThreadItemLoaded = ({
],
]}>
{Array.from(Array(indents)).map((_, n: number) => {
const isSkipped = item.ui.skippedIndents.has(n)
const isSkipped = item.ui.skippedIndentIndices.has(n)
return (
<View
key={`${post.uri}-padding-${n}`}