mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
fix(room): name bubbles cleared for the wrong user on USER_REMOVED
The USER_REMOVED handler for a UNIT filtered name bubbles with `bubble.roomIndex === event.id`, which KEEPS only the leaving user's bubble and drops everyone else's (the two sibling filters on the next lines correctly use `!==`). When any user left view, all other floating name bubbles vanished while the departed user's lingered. Flip to `!==`.
This commit is contained in:
@@ -361,7 +361,7 @@ const useAvatarInfoWidgetState = () =>
|
|||||||
{
|
{
|
||||||
let index = nameBubbles.findIndex(bubble => (bubble.roomIndex === event.id));
|
let index = nameBubbles.findIndex(bubble => (bubble.roomIndex === event.id));
|
||||||
|
|
||||||
if(index > -1) setNameBubbles(prevValue => prevValue.filter(bubble => (bubble.roomIndex === event.id)));
|
if(index > -1) setNameBubbles(prevValue => prevValue.filter(bubble => (bubble.roomIndex !== event.id)));
|
||||||
|
|
||||||
index = productBubbles.findIndex(bubble => (bubble.id === event.id));
|
index = productBubbles.findIndex(bubble => (bubble.id === event.id));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user