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

Make Sure that the two users in a DM Chat don't have the same color #3546

Merged
merged 5 commits into from
Apr 6, 2023

Conversation

RashulChutani
Copy link
Contributor

This PR makes sure that users in a DM Chat don't have the same color.
Fixes #3459
It works by checking if the uniqueUserIds has a length of 2, which
implies that the chat is between 2 users. It further checks if the users
have been assigned the same colorIndex. If it is the case, it changes it
for one of them.

@vercel
Copy link

vercel bot commented Apr 2, 2023

@RashulChutani is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@RashulChutani
Copy link
Contributor Author

Hi @getusha Thanks for suggesting the refactors. I have pushed the suggested changes. Thanks.

@RashulChutani RashulChutani requested a review from getusha April 3, 2023 18:01
@RashulChutani
Copy link
Contributor Author

RashulChutani commented Apr 3, 2023

I also tested the changes, and they seem to be working fine. 😄 In the below Image, the colorIndex for User2 has been updated to be different from User1 (It's new value is 1 + User1.colorIndex).
diff_colors
Thanks.

@RashulChutani RashulChutani requested a review from hkirat April 3, 2023 20:12
@RashulChutani
Copy link
Contributor Author

Hi @hkirat Just a gentle reminder to review the requested changes. I will be extremely thankful. 😃

@RashulChutani RashulChutani requested a review from hkirat April 6, 2023 07:39
@RashulChutani
Copy link
Contributor Author

Hi @hkirat, I have added the changes requested. Thanks.

@vercel
Copy link

vercel bot commented Apr 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
backpack ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2023 2:33pm

@hkirat hkirat merged commit 4808679 into coral-xyz:master Apr 6, 2023
@hkirat
Copy link
Contributor

hkirat commented Apr 6, 2023

Thankyou @RashulChutani for your contribution!

@RashulChutani
Copy link
Contributor Author

Thankyou @RashulChutani for your contribution!

My Pleasure! 🙂

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.

DMs should always have different username colors
3 participants