Skip to content

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

Open
@chrisbobbe

Description

@chrisbobbe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-modelImplementing our data model (PerAccountStore, etc.)a-msglistThe message-list screen, except what's label:a-contentbeta feedbackThings beta users have specifically asked for

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions