mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
Fix: Notification settings not affecting playSound
This commit is contained in:
parent
e03c2f88af
commit
51ac1f599c
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ interface Props {
|
|||
|
||||
function Settings({ settings, children }: Props) {
|
||||
const play = useMemo(() => {
|
||||
const enabled: SoundOptions = defaultsDeep(settings.notification ?? {}, DEFAULT_SOUNDS);
|
||||
const enabled: SoundOptions = defaultsDeep(settings.notification?.sounds ?? {}, DEFAULT_SOUNDS);
|
||||
return (sound: Sounds) => {
|
||||
if (enabled[sound]) {
|
||||
playSound(sound);
|
||||
|
|
|
@ -192,7 +192,7 @@ function Notifier(props: Props) {
|
|||
client.removeListener("message", message);
|
||||
client.users.removeListener("mutation", relationship);
|
||||
};
|
||||
}, [client, guild_id, channel_id, showNotification]);
|
||||
}, [client, playSound, guild_id, channel_id, showNotification]);
|
||||
|
||||
useEffect(() => {
|
||||
function visChange() {
|
||||
|
|
Loading…
Reference in a new issue