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: pointer always pops up when sending and receiving messages #360

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

hfdem
Copy link
Contributor

@hfdem hfdem commented Aug 9, 2024

The "New Messages" pointer pops up both when sending messages continuously and receiving messages. #77 (comment)

This patch fix it. But when sending and receiving messages very quickly, issues may still occur.

Changing scroll-behavior: smooth; to scroll-behavior: auto; in client/src/components/Messaging/styles/ScrollWrapper.module.css can significantly alleviate the problem.

However, considering the smoothness of the scrolling experience and the fact that only a few users will send or receive messages at such a high speed, no changes are made at this time.

@hfdem
Copy link
Contributor Author

hfdem commented Aug 9, 2024

  useEffect(() => {
    if (!isAtBottom && messageCount > 0) {
      setShowPopup(true);
    }
  }, [messageCount]);
[eslint] 
src/components/Messaging/ScrollWrapper.tsx
  Line [43](https://github.com/muke1908/chat-e2ee/actions/runs/10326709544/job/28590689666?pr=360#step:5:44):6:  React Hook useEffect has a missing dependency: 'isAtBottom'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

This syntax is valid, and it’s intentionally designed with this logic, so there’s no issue.

The "New Messages" pointer pops up both when sending messages continuously and receiving messages.
muke1908#77 (comment)
Copy link

sonarcloud bot commented Aug 11, 2024

@hfdem hfdem requested a review from muke1908 August 12, 2024 15:38
@muke1908 muke1908 merged commit 893ade8 into muke1908:master Aug 12, 2024
3 checks passed
@hfdem hfdem deleted the patch1 branch August 12, 2024 19:14
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