Fix notification->post jump for real (#5314)

* Revert "Fix notification scroll jump (#5297)"

This reverts commit e0d9e75407.

* Query notifications first
This commit is contained in:
dan
2024-09-13 15:01:09 +01:00
committed by GitHub
parent 0315814edd
commit 1dc7ef137c
2 changed files with 6 additions and 21 deletions
+6 -2
View File
@@ -408,10 +408,14 @@ export function* findAllPostsInQueryData(
}
}
}
for (let post of findAllPostsInFeedQueryData(queryClient, uri)) {
for (let post of findAllPostsInNotifsQueryData(queryClient, uri)) {
// Check notifications first. If you have a post in notifications,
// it's often due to a like or a repost, and we want to prioritize
// a post object with >0 likes/reposts over a stale version with no
// metrics in order to avoid a notification->post scroll jump.
yield postViewToPlaceholderThread(post)
}
for (let post of findAllPostsInNotifsQueryData(queryClient, uri)) {
for (let post of findAllPostsInFeedQueryData(queryClient, uri)) {
yield postViewToPlaceholderThread(post)
}
for (let post of findAllPostsInQuoteQueryData(queryClient, uri)) {