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

fix: initial load threads edge case #1361

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Conversation

isekovanic
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

There is currently a weird behaviour on the thread query-ing endpoint in the backend where if you call it with { limit: 0} it skips the pagination entirely and returns all of the threads. While things aren't initialized yet, it is entirely possible that both threads.length and unseenThreadIds.length are 0, hence the issue occurring (typically on the first ever load of the thread list).

This PR takes care that this doesn't happen and the limit is never 0.

Changelog

Copy link
Contributor

Size Change: +17 B (0%)

Total Size: 427 kB

Filename Size Change
dist/browser.es.js 92.5 kB +4 B (0%)
dist/browser.full-bundle.min.js 54.1 kB +2 B (0%)
dist/browser.js 93.6 kB +4 B (0%)
dist/index.es.js 92.6 kB +4 B (0%)
dist/index.js 93.7 kB +3 B (0%)

compressed-size-action

@isekovanic isekovanic merged commit 1393bac into master Sep 11, 2024
5 checks passed
@isekovanic isekovanic deleted the fix/avoid-using-0-limit-threads branch September 11, 2024 14:50
@github-actions github-actions bot mentioned this pull request Sep 11, 2024
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.

2 participants