-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Add muted indicator to people list #6152
Changes from 4 commits
12d7048
a615f3f
8a0ef4e
9b2c6f5
aec0dc8
9d0b47c
5260a2e
3817380
d9be4fd
37f1971
fe8dcba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,9 @@ export function calcGainMultiplier(level) { | |
); | ||
} | ||
|
||
export function updateAvatarVolumesPref(displayName, gainMultiplier, muted) { | ||
export function updateAvatarVolumesPref(playerSessionId, gainMultiplier, muted) { | ||
const avatarVoiceLevels = APP.store.state.preferences.avatarVoiceLevels || {}; | ||
avatarVoiceLevels[displayName] = { | ||
avatarVoiceLevels[playerSessionId] = { | ||
gainMultiplier, | ||
muted | ||
}; | ||
|
@@ -43,6 +43,6 @@ export function updateAvatarVolumesPref(displayName, gainMultiplier, muted) { | |
}); | ||
} | ||
|
||
export function getAvatarVolumePref(displayName) { | ||
return APP.store.state.preferences.avatarVoiceLevels?.[displayName]; | ||
export function getAvatarVolumePref(playerSessionId) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the reason to use the display name instead of the session id is that the session id is ephemeral and different for each session while the display name is stored locally and only changes if the user updates it which tends to be not that often. This way we can restore user volumes across different session as long as the user doesn't update the display name. It seems that at some point we stopped storing the We have two options, either store the Let me know if there is any other reason why we should switch to using the sessionId other than that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the context! I'll have a look into adding displayName back in. |
||
return APP.store.state.preferences.avatarVoiceLevels?.[playerSessionId]; | ||
} |
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.
This is already calling
updateGainMultiplier
which already callsupdateLocalMuted
so I believe we can remove theupdateLocalMuted
call from here.