Skip to content

fix: preserve feed scroll position when navigating back#190

Merged
barrydeen merged 2 commits intomainfrom
fix/feed-scroll-position
Mar 10, 2026
Merged

fix: preserve feed scroll position when navigating back#190
barrydeen merged 2 commits intomainfrom
fix/feed-scroll-position

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Feed scroll position is now preserved when navigating to a thread or compose screen and back
  • The LaunchedEffect in FeedScreen was unconditionally scrolling to top on every recomposition, including after back-navigation — now it tracks previous values and only scrolls to top when the feed type, list, relay, or relay set actually changes

Test plan

  • Scroll down in follows feed → tap a note → view thread → press back → verify scroll position is restored
  • Scroll down in feed → reply to a note → publish → verify scroll position is restored
  • Switch from follows to extended feed → verify it scrolls to top
  • Switch between relay/list feeds → verify it scrolls to top
  • Re-tap the feed tab → verify it scrolls to top (unchanged behavior)

@barrydeen barrydeen force-pushed the fix/feed-scroll-position branch from b477e28 to 7405d45 Compare March 10, 2026 16:07
The LaunchedEffect that scrolls to top on feed type changes was firing
on every recomposition, including after back-navigation from thread or
compose screens. Track previous values so scroll-to-top only triggers
when the feed type, list, relay, or relay set actually changes.
@barrydeen barrydeen force-pushed the fix/feed-scroll-position branch from 7405d45 to 0670063 Compare March 10, 2026 16:08
@barrydeen barrydeen merged commit c6813b4 into main Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant