Enable show less / more buttons for third party feeds (#8672)
Co-authored-by: hailey <hailey@blueskyweb.xyz> Co-authored-by: Hailey <me@haileyok.com>
This commit is contained in:
@@ -180,7 +180,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
||||
const {openComposer} = useOpenComposer()
|
||||
const {currentAccount, hasSession} = useSession()
|
||||
const {gtTablet} = useBreakpoints()
|
||||
const feedFeedback = useFeedFeedback(postSource?.feed, hasSession)
|
||||
const feedFeedback = useFeedFeedback(postSource?.feedSourceInfo, hasSession)
|
||||
|
||||
const post = postShadow
|
||||
const record = item.value.post.record
|
||||
|
||||
@@ -49,7 +49,10 @@ export function PostThread({uri}: {uri: string}) {
|
||||
const initialNumToRender = useInitialNumToRender()
|
||||
const {height: windowHeight} = useWindowDimensions()
|
||||
const anchorPostSource = useUnstablePostSource(uri)
|
||||
const feedFeedback = useFeedFeedback(anchorPostSource?.feed, hasSession)
|
||||
const feedFeedback = useFeedFeedback(
|
||||
anchorPostSource?.feedSourceInfo,
|
||||
hasSession,
|
||||
)
|
||||
|
||||
/*
|
||||
* One query to rule them all
|
||||
|
||||
@@ -169,7 +169,7 @@ export function ProfileFeedScreenInner({
|
||||
const [hasNew, setHasNew] = React.useState(false)
|
||||
const [isScrolledDown, setIsScrolledDown] = React.useState(false)
|
||||
const queryClient = useQueryClient()
|
||||
const feedFeedback = useFeedFeedback(feed, hasSession)
|
||||
const feedFeedback = useFeedFeedback(feedInfo, hasSession)
|
||||
const scrollElRef = useAnimatedRef() as ListRef
|
||||
|
||||
const onScrollToTop = useCallback(() => {
|
||||
|
||||
@@ -70,6 +70,7 @@ import {
|
||||
useFeedFeedbackContext,
|
||||
} from '#/state/feed-feedback'
|
||||
import {useFeedFeedback} from '#/state/feed-feedback'
|
||||
import {useFeedInfo} from '#/state/queries/feed'
|
||||
import {usePostLikeMutationQueue} from '#/state/queries/post'
|
||||
import {
|
||||
type AuthorFilter,
|
||||
@@ -199,7 +200,9 @@ function Feed() {
|
||||
throw new Error(`Invalid video feed params ${JSON.stringify(params)}`)
|
||||
}
|
||||
}, [params])
|
||||
const feedFeedback = useFeedFeedback(feedDesc, hasSession)
|
||||
const feedUri = params.type === 'feedgen' ? params.uri : undefined
|
||||
const {data: feedInfo} = useFeedInfo(feedUri)
|
||||
const feedFeedback = useFeedFeedback(feedInfo, hasSession)
|
||||
const {data, error, hasNextPage, isFetchingNextPage, fetchNextPage} =
|
||||
usePostFeedQuery(
|
||||
feedDesc,
|
||||
|
||||
Reference in New Issue
Block a user