Cleanup last commit
This commit is contained in:
@@ -129,7 +129,7 @@ export function Inner({uri}: {uri: string | undefined}) {
|
|||||||
const headerHeight = headerElement.getBoundingClientRect().height
|
const headerHeight = headerElement.getBoundingClientRect().height
|
||||||
|
|
||||||
if (shouldScrollToAnchor.current) {
|
if (shouldScrollToAnchor.current) {
|
||||||
/**
|
/*
|
||||||
* `deferParents` is `true` on a cold load, and always reset to
|
* `deferParents` is `true` on a cold load, and always reset to
|
||||||
* `true` when params change (via the key on the anchor post).
|
* `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
|
* `onLayout` to fire any time the thread params change so that
|
||||||
* `deferParents` is always reset to `false` once the anchor post is
|
* `deferParents` is always reset to `false` once the anchor post is
|
||||||
* rendered.
|
* 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}
|
key={item.uri + thread.state.view + thread.state.sort}
|
||||||
ref={anchorRef}
|
ref={anchorRef}
|
||||||
|
|||||||
@@ -264,12 +264,6 @@ export function usePostThread({anchor}: {anchor?: string}) {
|
|||||||
setOtherItemsVisible,
|
setOtherItemsVisible,
|
||||||
])
|
])
|
||||||
|
|
||||||
// items.forEach(slice => {
|
|
||||||
// if (slice.type === 'threadPost' && slice.depth === 0) {
|
|
||||||
// slice.key = slice.uri + view + sort
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
return useMemo(
|
return useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
state: {
|
state: {
|
||||||
|
|||||||
Reference in New Issue
Block a user