Skip to content
Snippets Groups Projects
Commit 51ac1f59 authored by insert's avatar insert
Browse files

Fix: Notification settings not affecting playSound

parent e03c2f88
Branches
No related merge requests found
......@@ -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() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment