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

DMs should always have different username colors #3459

Closed
trucy opened this issue Mar 28, 2023 · 7 comments · Fixed by #3546
Closed

DMs should always have different username colors #3459

trucy opened this issue Mar 28, 2023 · 7 comments · Fixed by #3546
Labels

Comments

@trucy
Copy link

trucy commented Mar 28, 2023

Usernames are currently randomly assigned, but sometimes you can end up with the same color for sender and recipient in a DM. Should be a rule (only for DMs) that makes sure the two colors are unique for sender and receiver.

Example of them being the same

Screenshot 2023-03-28 at 12 42 28 PM

@trucy trucy added the polish label Mar 28, 2023
@joe-shajan
Copy link

Hey, @trucy So right now both the colors are the same. and this should not happen, right?

228323990-e6713c8d-1d32-4d66-a5db-d3003bc37900

I would like to fix this. Can you assign this to me?

@trucy
Copy link
Author

trucy commented Mar 29, 2023

@joeshajan These colors are randomly assigned, but sometimes they can end up being the same. There should be some rule that enforces them always being different in a 1-1 DM. Just assigned you, thanks!

@joe-shajan
Copy link

Hey, @trucy can you please help me with this?

How can I troubleshoot my attempt to run Backpack locally, since the page I see in my Chrome extension is different from what is shown in the video? Also, how long should I expect to wait for an invite code after applying for one?

Screenshot from 2023-04-01 10-53-44

@Dharmavineta
Copy link

joeshajan

same issue here. Applied for invite but the waiting room is whooping 19+k

@RashulChutani
Copy link
Contributor

@trucy In order to fix the above issue, when both users have the same color, I have changed the colorIndex of user_2 to be 1 + colorIndex of user_1. Does that look fine, or should I change the colors to random values? Thanks.

@hkirat
Copy link
Contributor

hkirat commented Apr 3, 2023

This invite code should work for everyone - 382aa33a-a4eb-4c77-a196-ff29cc675c27

@joe-shajan
Copy link

Thanks @hkirat

@joe-shajan joe-shajan removed their assignment Apr 4, 2023
hkirat pushed a commit that referenced this issue Apr 6, 2023
…3546)

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

* Reformat packages/tamagui-core/src/hooks/chat/useChatsWithMetadata.tsx

Co-authored-by: Getabalew Tesfaye <75031127+getusha@users.noreply.github.com>

* Reformat packages/tamagui-core/src/hooks/chat/useChatsWithMetadata.tsx

Co-authored-by: Getabalew Tesfaye <75031127+getusha@users.noreply.github.com>

* Add Map of UserId to ColorIndex to not update the users Variable #3459

* Use Map.set() and Map.get()

---------

Co-authored-by: Getabalew Tesfaye <75031127+getusha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants