nicolium: fix hasDescendants

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-26 00:01:18 +01:00
parent 52fcb72c1d
commit 11902eb7bb

View File

@@ -243,7 +243,7 @@ const Thread = ({
const renderChildren = (list: Array<string>) => const renderChildren = (list: Array<string>) =>
list.map((id) => { list.map((id) => {
if (id === status.id) if (id === status.id) {
return ( return (
<div className={clsx({ 'pb-4': hasDescendants })} key={status.id}> <div className={clsx({ 'pb-4': hasDescendants })} key={status.id}>
{deleted ? ( {deleted ? (
@@ -289,6 +289,7 @@ const Thread = ({
)} )}
</div> </div>
); );
}
if (id.endsWith('-tombstone')) { if (id.endsWith('-tombstone')) {
return renderTombstone(id); return renderTombstone(id);
@@ -328,7 +329,7 @@ const Thread = ({
[status.id], [status.id],
); );
const hasDescendants = thread.length > statusIndex; const hasDescendants = thread.length > statusIndex + 1;
type HotkeyHandlers = { [key: string]: (keyEvent?: KeyboardEvent) => void }; type HotkeyHandlers = { [key: string]: (keyEvent?: KeyboardEvent) => void };