From 17011252d647fcedae00716c326014527cc7a3c8 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:44:10 +0100 Subject: [PATCH] Preserve feed scroll position across navigation Keep Feed component mounted (hidden via CSS) instead of unmounting when navigating to threads/profiles/etc. Back button now returns to the exact scroll position in the feed. --- src/App.tsx | 4 +++- src/components/feed/Feed.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index e78c71c..a0df5a9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -62,7 +62,9 @@ function App() {
- {currentView === "feed" && } +
+ +
{currentView === "search" && } {currentView === "relays" && } {currentView === "settings" && } diff --git a/src/components/feed/Feed.tsx b/src/components/feed/Feed.tsx index dd06999..cea696a 100644 --- a/src/components/feed/Feed.tsx +++ b/src/components/feed/Feed.tsx @@ -24,6 +24,7 @@ export function Feed() { connect().then(() => loadFeed()); }, []); + useEffect(() => { if (tab === "following" && loggedIn && follows.length > 0) { loadFollowFeed();