Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msglist: Fetch-older is defeated by a run of 100+ muted messages #1256

Open
chrisbobbe opened this issue Jan 4, 2025 · 0 comments
Open

msglist: Fetch-older is defeated by a run of 100+ muted messages #1256

chrisbobbe opened this issue Jan 4, 2025 · 0 comments
Labels
a-msglist The message-list screen, except what's label:a-content

Comments

@chrisbobbe
Copy link
Collaborator

I ran into an odd bug yesterday in the iOS app:

  1. Muted a topic ("zulip.yaml") in the #api documentation channel on CZO
  2. In the Flutter app, opened the channel narrow for #api documentation

Expected: to see the channel feed as usual, just without messages in the topic I muted
Actual: I only saw one message! 🙂 The most recent in the channel. And nothing above it saying I'd reached the start of the channel, or that it was still loading more messages:

Diagnosis

I think two things are breaking this:

  • When the visible messages occupy much less than a screenful, the ScrollPhysics doesn't allow changing the scroll position, so the user can't trigger a needed fetchOlder. This is happening here because apparently 99 of the 100 messages from fetchInitial are muted. A simple fix is to use AlwaysScrollableScrollPhysics for the message list.
  • Normally, a fetchOlder response will cause us to do the next fetchOlder request with a different, older message as the "anchor". Here, though, we're sending the same fetchOlder request with the same anchor. Why? Because the anchor we request is the oldest visible (non-muted; _messageVisible) message. If the fetchOlder response is entirely messages that we don't count as visible, then "the oldest visible message", and therefore the anchor, won't change.
@chrisbobbe chrisbobbe added the a-msglist The message-list screen, except what's label:a-content label Jan 4, 2025
@chrisbobbe chrisbobbe changed the title msglist: Fetch-older is defeated by a run of >100 muted messages msglist: Fetch-older is defeated by a run of 100+ muted messages Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-msglist The message-list screen, except what's label:a-content
Projects
Status: No status
Development

No branches or pull requests

1 participant