Use indent ya idiot

This commit is contained in:
Eric Bailey
2025-05-27 21:24:02 -05:00
parent e939e41450
commit fd0162c321
5 changed files with 36 additions and 24 deletions
+6 -3
View File
@@ -6,7 +6,10 @@ import {
AtUri,
} from '@atproto/api'
import {type TraversalMetadata} from '#/state/queries/usePostThread/types'
import {
type Slice,
type TraversalMetadata,
} from '#/state/queries/usePostThread/types'
import * as bsky from '#/types/bsky'
export function getThreadgateRecord(
@@ -38,13 +41,13 @@ export function getPostRecord(post: AppBskyFeedDefs.PostView) {
}
export function getPostTraversalMetadata(
item: AppBskyUnspeccedGetPostThreadV2.ThreadItem,
item: Extract<Slice, {type: 'threadPost'}>,
): TraversalMetadata | undefined {
if (!AppBskyUnspeccedGetPostThreadV2.isThreadItemPost(item.value)) return
const replyCount = item.value.post.replyCount || 0
const unhydratedReplies = item.value.moreReplies || 0
return {
depth: item.depth,
indent: item.ui.indent,
/**
* If the post has more than a single reply, and the total reply count
* minus the number of replies not present in the response is greater than