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

chat: prevent gap in message history when viewing scrollback #3198

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

latter-bolden
Copy link
Member

If a new message comes in while you're viewing a scroll-back (search or message ref clicked), it will be added to the cache directly after the loaded message history. This can lead to a weird gap between new messages and the point in the history you were viewing. An automated refetch is fired which resolves the situation, but it can take a bit depending on network conditions leaving you in a weird state until the refetch completes.

This prevents that scenario by checking to see if you have the newest messages before adding incoming ones to the cache.

Fixes LAND-1478

PR Checklist

  • Includes changes to desk files
  • Describes how you tested the PR locally (test ship vs livenet)
  • If a new feature, includes automated tests
  • Comments added anywhere logic may be confusing without context

Copy link

linear bot commented Jan 25, 2024

Copy link
Member

@arthyn arthyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arthyn arthyn merged commit 7d97524 into develop Jan 29, 2024
1 check passed
@arthyn arthyn deleted the lb/new-message-while-scrollback branch January 29, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants