Skip to content

fix: channel list footer flicker on pagination - #3911

Merged
isekovanic merged 1 commit into
fix/channel-list-recovery-rerendersfrom
fix/channel-list-loading-spinner-flicker
Oct 30, 2026
Merged

isekovanic merged 1 commit into
fix/channel-list-recovery-rerendersfrom
fix/channel-list-loading-spinner-flicker

Conversation

@isekovanic

Copy link
Copy Markdown
Contributor

Ticket: https://linear.app/stream/issue/REACT-1476/fix-odd-edge-cases-for-channel-list-recovery

🎯 Goal

Scrolling down the channel list made the footer loading indicator flicker in and out, and often it was not visible at all while the next page loaded. On V9 it showed for the whole load.

Stacked on #3910.

πŸ›  Implementation details

The footer shows while activeQueryType is 'loadChannels' and the paginator is loading. queryChannels sets activeQueryType back to null once its toTail() returns. While a page is loading, the paginator refuses another toTail(), which returns right away. So a second loadNextPage cleared the flag of the page still in flight.

FlatList calls onEndReached again whenever the content length changes, and showing or hiding the footer changes it. So each page went through a loop: the footer mounts, a refused call hides it, the footer comes back briefly, and it stays hidden for the rest of the load.

queryChannels now returns early while the paginator is loading, so a query the paginator would refuse never touches activeQueryType. This also keeps a refused call from clearing the refreshing state of a pull-to-refresh in flight.

🎨 UI Changes

The footer loading indicator shows once per next page, for the whole load.

πŸ§ͺ Testing

  • New ChannelList test: calling loadNextPage again while a next page loads keeps the footer indicator, and it hides once the page lands. It fails without the fix.
  • ChannelList and ChannelPreview tests, yarn test:typecheck, eslint and prettier pass.
  • On an Android emulator with release builds of the SampleApp, a user with 165 channels (16 next pages), cold start and fling to the end of the list, 3 runs each, with a probe logging footer mounts:
pages footer shown once flickering refused next-page calls
before 48 0 48 (59 extra mounts) 107
after 48 48 0 0

β˜‘οΈ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@isekovanic
isekovanic force-pushed the fix/channel-list-loading-spinner-flicker branch from e50f5dd to 7883185 Compare October 30, 2026 12:34
@Stream-SDK-Bot

Copy link
Copy Markdown
Contributor

SDK Size

title develop branch diff status
js_bundle_size 2037 KB 2020 KB -17807 B πŸš€
ai_components_size 163 KB 163 KB -16 B πŸš€

@isekovanic
isekovanic merged commit a59a108 into V10 Oct 30, 2026
2 checks passed
@isekovanic
isekovanic deleted the fix/channel-list-loading-spinner-flicker branch October 30, 2026 12:47
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.

3 participants