mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Add settings for disabling animations / sounds.
This commit is contained in:
@@ -8,12 +8,13 @@ Please see LICENSE in the repository root for full details.
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { useReactions } from "../useReactions";
|
||||
import { playReactionsSound, useSetting } from "../settings/settings";
|
||||
|
||||
export function ReactionsAudioRenderer(): ReactNode {
|
||||
const { reactions } = useReactions();
|
||||
const [shouldPlay] = useSetting(playReactionsSound);
|
||||
|
||||
// TODO: This may need to ensure we don't change the value if a duplicate reaction comes down.
|
||||
const expectedReactions = [...new Set([...Object.values(reactions)])];
|
||||
const expectedReactions = shouldPlay ? [...new Set([...Object.values(reactions)])] : [];
|
||||
return (
|
||||
<>
|
||||
{expectedReactions.map(
|
||||
|
||||
Reference in New Issue
Block a user