From cdf54e9eff4daea45ac78290bfc20454ee08dc7e Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Sat, 28 Mar 2026 09:51:30 -0500 Subject: [PATCH] Fix 'new posts' button on search page not loading posts The button only called window.scrollTo() and relied on the scroll event listener to auto-flush the stream buffer. This failed when smooth scrolling didn't fire reliable scroll events (especially on mobile/ Capacitor WebView). Now explicitly calls flushStreamBuffer() on click. --- src/pages/SearchPage.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/SearchPage.tsx b/src/pages/SearchPage.tsx index e45cd90e..23eb6380 100644 --- a/src/pages/SearchPage.tsx +++ b/src/pages/SearchPage.tsx @@ -400,7 +400,7 @@ export function SearchPage() { ? authorPubkeys : undefined; - const { posts, isLoading: postsLoading, newPostCount } = useStreamPosts(debouncedSearchQuery, { + const { posts, isLoading: postsLoading, newPostCount, flushStreamBuffer } = useStreamPosts(debouncedSearchQuery, { includeReplies, mediaType, language, @@ -757,7 +757,10 @@ export function SearchPage() { }} >