Update types

This commit is contained in:
Eric Bailey
2025-05-31 13:59:52 -05:00
parent 8289d625c7
commit 45538dc0d8
9 changed files with 100 additions and 96 deletions
+15 -1
View File
@@ -114,6 +114,11 @@ export function Inner({uri}: {uri: string | undefined}) {
const anchorOffsetTop = anchorElement.getBoundingClientRect().top
const headerHeight = headerElement.getBoundingClientRect().height
const scrollPosition = anchorOffsetTop - headerHeight
console.log({
anchorOffsetTop,
headerHeight,
scrollPosition,
})
/*
* If scroll position is negative, it means the anchor post is above the
* top of the screen, meaning the user scrolled the list. In that case,
@@ -292,7 +297,16 @@ export function Inner({uri}: {uri: string | undefined}) {
return (
<PostThreadShowHiddenReplies
type="hidden"
onPress={() => item.onLoad()}
onPress={() => {
item.onLoad()
/*
* Bit of a hack. This resets the ref value for the anchor so that
* the next time `onContentSizeChangeWebOnly` fires, it won't
* adjust scroll. However, on the next render cycle, it will, which
* will give us time to insert the skeleton state and handle scroll.
*/
anchorRef.current = null
}}
/>
)
} else if (item.type === 'skeleton') {