Function
appendThread
(
thread: ThreadSummary,
depth: number,
rows: ThreadRow[],
)
Source from the content-addressed store, hash-verified
| 107 | const visibleRoots = unpinnedRoots.slice(0, visibleRootCount); |
| 108 | |
| 109 | const appendThread = ( |
| 110 | thread: ThreadSummary, |
| 111 | depth: number, |
| 112 | rows: ThreadRow[], |
| 113 | ) => { |
| 114 | rows.push({ thread, depth }); |
| 115 | const children = childrenByParent.get(thread.id) ?? []; |
| 116 | children.forEach((child) => appendThread(child, depth + 1, rows)); |
| 117 | }; |
| 118 | |
| 119 | const pinnedRows: ThreadRow[] = []; |
| 120 | pinnedRoots.forEach((thread) => appendThread(thread, 0, pinnedRows)); |
Tested by
no test coverage detected