Reorg
This commit is contained in:
@@ -56,8 +56,7 @@ export function flatten(
|
||||
i + 1 + (pi - parents.length),
|
||||
0,
|
||||
views.readMore({
|
||||
item,
|
||||
parent: parent,
|
||||
parent,
|
||||
}),
|
||||
)
|
||||
parents.pop()
|
||||
@@ -94,8 +93,7 @@ export function flatten(
|
||||
i + 2 + (pi - parents.length),
|
||||
0,
|
||||
views.readMore({
|
||||
item,
|
||||
parent: parent,
|
||||
parent,
|
||||
}),
|
||||
)
|
||||
parents.pop()
|
||||
@@ -116,6 +114,8 @@ export function flatten(
|
||||
}
|
||||
}
|
||||
|
||||
console.log(flattened)
|
||||
|
||||
/*
|
||||
* Insert hidden items and buttons to show them
|
||||
*/
|
||||
|
||||
@@ -101,16 +101,14 @@ export function threadPost({
|
||||
}
|
||||
|
||||
export function readMore({
|
||||
item,
|
||||
parent,
|
||||
}: {
|
||||
item: Extract<Slice, {type: 'threadPost'}>
|
||||
parent: Extract<Slice, {type: 'threadPost'}>
|
||||
}) {
|
||||
return {
|
||||
type: 'readMore' as const,
|
||||
key: `readMore:${parent.uri}`,
|
||||
indent: parent.depth + (item.depth < parent.depth ? -1 : 0),
|
||||
indent: parent.depth,
|
||||
replyCount: parent.value.moreReplies,
|
||||
nextAnchor: parent,
|
||||
nextAnchorUri: new AtUri(parent.uri),
|
||||
|
||||
Reference in New Issue
Block a user