From 02eda9ebd226ea7c0b6564438e0b8d0c68fcf20f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 6 Jun 2025 16:03:08 -0500 Subject: [PATCH] Cleanup last commit --- src/screens/PostThread/index.tsx | 5 ++++- src/state/queries/usePostThread/index.ts | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/screens/PostThread/index.tsx b/src/screens/PostThread/index.tsx index 969c9afb28..6aa5a5c5db 100644 --- a/src/screens/PostThread/index.tsx +++ b/src/screens/PostThread/index.tsx @@ -129,7 +129,7 @@ export function Inner({uri}: {uri: string | undefined}) { const headerHeight = headerElement.getBoundingClientRect().height if (shouldScrollToAnchor.current) { - /** + /* * `deferParents` is `true` on a cold load, and always reset to * `true` when params change (via the key on the anchor post). * @@ -262,6 +262,9 @@ export function Inner({uri}: {uri: string | undefined}) { * `onLayout` to fire any time the thread params change so that * `deferParents` is always reset to `false` once the anchor post is * rendered. + * + * If we ever add additional thread params to this screen, they + * will need to be added here. */ key={item.uri + thread.state.view + thread.state.sort} ref={anchorRef} diff --git a/src/state/queries/usePostThread/index.ts b/src/state/queries/usePostThread/index.ts index 549fe8b852..4bf296ddc6 100644 --- a/src/state/queries/usePostThread/index.ts +++ b/src/state/queries/usePostThread/index.ts @@ -264,12 +264,6 @@ export function usePostThread({anchor}: {anchor?: string}) { setOtherItemsVisible, ]) - // items.forEach(slice => { - // if (slice.type === 'threadPost' && slice.depth === 0) { - // slice.key = slice.uri + view + sort - // } - // }) - return useMemo( () => ({ state: {