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

Wait for smooth scrolling animation to add new message #2084

Merged
merged 4 commits into from
Apr 24, 2021

Conversation

Pizzabelly
Copy link
Contributor

@Pizzabelly Pizzabelly commented Oct 18, 2020

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

This fixes a bug in smooth scrolling where scrolling at the same time as a new message was added would cause a visual glitch that looks like the text jumps up and back instantly. To test it you can go in a fast chat and once the message queue fill up, and it starts scrolling to keep your place in the chat, you can scroll up and down to see it.

I'm not sure if this is a good fix because I couldn't fully understand the smooth scrolling code, and this seems like a workaround. So if there is a better way to fix this I'll just close this.

@ALazyMeme
Copy link
Collaborator

Can we fix the merge conflicts so this can be reviewed and hopefully merged soon?

Copy link
Collaborator

@zneix zneix left a comment

Choose a reason for hiding this comment

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

When it comes to fixing the visual bug, the PR does the job. Not entirely sure about the code, but that looks good to me. @pajlada could you have another look at this?

@pajlada
Copy link
Member

pajlada commented Apr 24, 2021

This seems like a fair fix for me.

Basically 'pausing' all message additions during the 'smooth scrolling' effect.

@pajlada pajlada enabled auto-merge (squash) April 24, 2021 15:03
@pajlada pajlada merged commit 24a2d8a into Chatterino:master Apr 24, 2021
@fourtf
Copy link
Member

fourtf commented May 5, 2021

@Pizzabelly could you explain how the other event loop works and if there is race conditions that can happen?

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.

5 participants