-
Notifications
You must be signed in to change notification settings - Fork 214
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
Typing-display-fix #381
base: develop
Are you sure you want to change the base?
Typing-display-fix #381
Conversation
if (typingUsers.length) { | ||
const otherTypingUsers = typingUsers.filter((user) => user !== currentUserName); | ||
|
||
if (typingUsers.length === 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you have already filtered typingUsers, and stored the list in otherTypingUsers, the later variable should be used afterwards. However, I wonder why we need to refilter, when it is already done in useEffect. The issue might be somewhere else if its happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @abhinavkrin . Actually, the previous approach wasn't giving the correct output, which should be like - not to show that the "current user" is typing, and show it only when others are typing.
So, I had to resolve to use this manual approach of using if-else which covers all the cases. It works fine btw.
Brief Title
This PR fixes the issue #372 , and the issue described in PR #367 (in comments)
Acceptance Criteria fulfillment
<user> is typing...
text when other users are typingFixes #372
Video/Screenshots
typing.webm