mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-31 11:34:38 +00:00
cleanup
This commit is contained in:
@@ -110,10 +110,11 @@ function buildDeviceBehaviors(
|
||||
toggleBlur$: scope.behavior(
|
||||
combineLatest([backgroundBlurSettings.value$, disableSwitcher$]).pipe(
|
||||
map(([current, switcherDisabled]) => {
|
||||
return () =>
|
||||
!switcherDisabled && supportsBackgroundProcessors()
|
||||
? (): void => backgroundBlurSettings.setValue(!current)
|
||||
: constant(undefined);
|
||||
return !switcherDisabled && supportsBackgroundProcessors()
|
||||
? (): void => {
|
||||
backgroundBlurSettings.setValue(!current);
|
||||
}
|
||||
: undefined;
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -70,16 +70,7 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
let button;
|
||||
let toggles =
|
||||
backgroundBlurToggleClick === undefined
|
||||
? []
|
||||
: [
|
||||
{
|
||||
label: t("action.blur_background"),
|
||||
enabled: videoBlurEnabled,
|
||||
id: BLUR_ID,
|
||||
},
|
||||
];
|
||||
let toggles: { label: string; enabled: boolean; id: string }[] = [];
|
||||
switch (iconsAndLabels) {
|
||||
case "video":
|
||||
button = (
|
||||
@@ -94,7 +85,15 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
|
||||
data-testid="incall_videomute"
|
||||
/>
|
||||
);
|
||||
toggles = [];
|
||||
if (backgroundBlurToggleClick !== undefined) {
|
||||
toggles = [
|
||||
{
|
||||
label: t("action.blur_background"),
|
||||
enabled: videoBlurEnabled ?? false,
|
||||
id: BLUR_ID,
|
||||
},
|
||||
];
|
||||
}
|
||||
break;
|
||||
case "audio":
|
||||
button = (
|
||||
|
||||
Reference in New Issue
Block a user