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

Spurious fetch-older request when scrolling past a code block #507

Closed
gnprice opened this issue Feb 7, 2024 · 0 comments · Fixed by #508
Closed

Spurious fetch-older request when scrolling past a code block #507

gnprice opened this issue Feb 7, 2024 · 0 comments · Fixed by #508
Assignees
Labels
a-msglist The message-list screen, except what's label:a-content

Comments

@gnprice
Copy link
Member

gnprice commented Feb 7, 2024

To reproduce:

  1. Run the app in debug mode, and watch the debug console, where we print a log line for each HTTP request to the Zulip server.
  2. Open the message list, in a narrow where there will be code blocks somewhere in the history, and plenty of older history before that.
  3. Scroll until a code block comes into view. (Or more precisely: until a message containing a code block is nearly in view, so that its widget gets built.)
  4. In the console, note the get-messages request for older messages.
  5. Scroll the code block out of view (by enough so its widget gets removed), then back (nearly) into view, several times. Note the get-messages request each time the code block's message comes back (nearly) into view.

The expected behavior is that we should see such a request only if we've gotten within a few screenfuls of the top of the history we have. Step 4 could therefore happen by coincidence, but Step 5 should definitely not happen, because after the first such request we have plenty of previous history.

I discovered this while working on #80; it's a small oversight in how we're using a bit of the Flutter API. I'll send a fix.

@gnprice gnprice added the a-msglist The message-list screen, except what's label:a-content label Feb 7, 2024
@gnprice gnprice added this to the Beta 2 milestone Feb 7, 2024
@gnprice gnprice self-assigned this Feb 7, 2024
gnprice added a commit to gnprice/zulip-flutter that referenced this issue Feb 7, 2024
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: Done
Development

Successfully merging a pull request may close this issue.

1 participant