[Glitch] Add lines to threads in web UI

Port 290e4aba31 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2023-04-24 08:07:03 +02:00
committed by Claire
parent 8015297f9e
commit 7b01b7c3bf
4 changed files with 76 additions and 7 deletions

View File

@@ -559,8 +559,10 @@ class Status extends ImmutablePureComponent {
this.column.scrollTop();
};
renderChildren (list) {
return list.map(id => (
renderChildren (list, ancestors) {
const { params: { statusId } } = this.props;
return list.map((id, i) => (
<StatusContainer
key={id}
id={id}
@@ -568,6 +570,9 @@ class Status extends ImmutablePureComponent {
onMoveUp={this.handleMoveUp}
onMoveDown={this.handleMoveDown}
contextType='thread'
previousId={i > 0 && list.get(i - 1)}
nextId={list.get(i + 1) || (ancestors && statusId)}
rootId={statusId}
/>
));
}
@@ -628,7 +633,7 @@ class Status extends ImmutablePureComponent {
const isExpanded = settings.getIn(['content_warnings', 'shared_state']) ? !status.get('hidden') : this.state.isExpanded;
if (ancestorsIds && ancestorsIds.size > 0) {
ancestors = <>{this.renderChildren(ancestorsIds)}</>;
ancestors = <>{this.renderChildren(ancestorsIds, true)}</>;
}
if (descendantsIds && descendantsIds.size > 0) {