diff --git a/packages/nicolium/src/features/status/components/thread-status.tsx b/packages/nicolium/src/features/status/components/thread-status.tsx index a4b0c42a3..56b0a8ee1 100644 --- a/packages/nicolium/src/features/status/components/thread-status.tsx +++ b/packages/nicolium/src/features/status/components/thread-status.tsx @@ -19,6 +19,7 @@ interface IThreadStatus { onMoveDown: (id: string) => void; linear?: boolean; depth?: number; + isAncestor?: boolean; } /** Status with reply-connector in threads. */ @@ -46,7 +47,7 @@ const ThreadStatus: React.FC = (props): React.JSX.Element => { } const renderTreeConnector = (): React.JSX.Element | null => { - if (props.linear || isIndentMode) return null; + if (props.linear || (isIndentMode && !props.isAncestor)) return null; const isConnectedTop = replyToId && replyToId !== focusedStatusId; const isConnectedBottom = replyCount > 0; @@ -74,9 +75,12 @@ const ThreadStatus: React.FC = (props): React.JSX.Element => { return (
- {isIndentMode && depth > 0 && } + {isIndentMode && depth > 0 && !props.isAncestor && } {renderTreeConnector()}
0 ? { marginInlineStart: `${depth}rem` } : undefined}>{status}
{props.linear && ( diff --git a/packages/nicolium/src/features/status/components/thread.tsx b/packages/nicolium/src/features/status/components/thread.tsx index 90fe28466..e6db1dcbe 100644 --- a/packages/nicolium/src/features/status/components/thread.tsx +++ b/packages/nicolium/src/features/status/components/thread.tsx @@ -218,18 +218,22 @@ const Thread = ({
); - const renderStatus = (id: string) => ( - - ); + const renderStatus = (id: string) => { + const isAncestor = treeIndent && thread.indexOf(id) < statusIndex; + return ( + + ); + }; const renderPendingStatus = (id: string) => { const idempotencyKey = id.replace(/^末pending-/, '');