mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
lint
This commit is contained in:
@@ -189,11 +189,13 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
|
||||
const reactionsIcons = useMemo(
|
||||
() =>
|
||||
shouldShowReactions ? Object.entries(reactions).map(([sender, { emoji }]) => ({
|
||||
sender,
|
||||
emoji,
|
||||
startX: -Math.ceil(Math.random() * 50) - 25,
|
||||
})) : [],
|
||||
shouldShowReactions
|
||||
? Object.entries(reactions).map(([sender, { emoji }]) => ({
|
||||
sender,
|
||||
emoji,
|
||||
startX: -Math.ceil(Math.random() * 50) - 25,
|
||||
}))
|
||||
: [],
|
||||
[shouldShowReactions, reactions],
|
||||
);
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ export function ReactionsAudioRenderer(): ReactNode {
|
||||
const { reactions } = useReactions();
|
||||
const [shouldPlay] = useSetting(playReactionsSound);
|
||||
|
||||
const expectedReactions = shouldPlay ? [...new Set([...Object.values(reactions)])] : [];
|
||||
const expectedReactions = shouldPlay
|
||||
? [...new Set([...Object.values(reactions)])]
|
||||
: [];
|
||||
return (
|
||||
<>
|
||||
{expectedReactions.map(
|
||||
|
||||
@@ -23,15 +23,12 @@ export const PreferencesSettingsTab: FC = () => {
|
||||
showHandRaisedTimerSetting,
|
||||
);
|
||||
|
||||
const [showReactions, setShowReactions] = useSetting(
|
||||
showReactionsSetting,
|
||||
);
|
||||
const [showReactions, setShowReactions] = useSetting(showReactionsSetting);
|
||||
|
||||
const [playReactionsSound, setPlayReactionSound] = useSetting(
|
||||
playReactionsSoundSetting,
|
||||
);
|
||||
|
||||
|
||||
const onChangeSetting = useCallback(
|
||||
(e: ChangeEvent<HTMLInputElement>, fn: (value: boolean) => void) => {
|
||||
fn(e.target.checked);
|
||||
@@ -60,9 +57,7 @@ export const PreferencesSettingsTab: FC = () => {
|
||||
<InputField
|
||||
id="showReactions"
|
||||
label={t("settings.preferences_tab.reactions_show_label")}
|
||||
description={t(
|
||||
"settings.preferences_tab.reactions_show_description",
|
||||
)}
|
||||
description={t("settings.preferences_tab.reactions_show_description")}
|
||||
type="checkbox"
|
||||
checked={showReactions}
|
||||
onChange={(e) => onChangeSetting(e, setShowReactions)}
|
||||
|
||||
@@ -90,10 +90,7 @@ export const showHandRaisedTimer = new Setting<boolean>(
|
||||
false,
|
||||
);
|
||||
|
||||
export const showReactions = new Setting<boolean>(
|
||||
"reactions-show",
|
||||
true,
|
||||
);
|
||||
export const showReactions = new Setting<boolean>("reactions-show", true);
|
||||
|
||||
export const playReactionsSound = new Setting<boolean>(
|
||||
"reactions-play-sound",
|
||||
|
||||
Reference in New Issue
Block a user