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