From 68f79e52e7d3341e98411df402fb504bb4b612bc Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:15:48 -0400 Subject: [PATCH] fix(virtual-background) Remove unused action type VIRTUAL_BACKGROUND_TRACK_CHANGED. --- react/features/virtual-background/actionTypes.ts | 10 ---------- react/features/virtual-background/actions.ts | 15 +-------------- .../components/VirtualBackgroundDialog.tsx | 3 +-- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/react/features/virtual-background/actionTypes.ts b/react/features/virtual-background/actionTypes.ts index 3124340d2..1b0ff1d1f 100644 --- a/react/features/virtual-background/actionTypes.ts +++ b/react/features/virtual-background/actionTypes.ts @@ -23,13 +23,3 @@ export const BACKGROUND_ENABLED = 'BACKGROUND_ENABLED'; * }} */ export const SET_VIRTUAL_BACKGROUND = 'SET_VIRTUAL_BACKGROUND'; - -/** - * The type which signals if the local track was changed due to a changes of the virtual background. - * - * @returns {{ - * type: VIRTUAL_BACKGROUND_TRACK_CHANGED - *}} - */ - -export const VIRTUAL_BACKGROUND_TRACK_CHANGED = 'VIRTUAL_BACKGROUND_TRACK_CHANGED'; diff --git a/react/features/virtual-background/actions.ts b/react/features/virtual-background/actions.ts index d1ef6699f..af4ed4fc9 100644 --- a/react/features/virtual-background/actions.ts +++ b/react/features/virtual-background/actions.ts @@ -3,7 +3,7 @@ import { IStore } from '../app/types'; // @ts-ignore import { createVirtualBackgroundEffect } from '../stream-effects/virtual-background'; -import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND, VIRTUAL_BACKGROUND_TRACK_CHANGED } from './actionTypes'; +import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND } from './actionTypes'; import logger from './logger'; import { VirtualBackgroundOptions } from './types'; @@ -73,16 +73,3 @@ export function backgroundEnabled(backgroundEffectEnabled: boolean) { backgroundEffectEnabled }; } - -/** - * Signals if the local track was changed due to a changes of the virtual background. - * - * @returns {{ - * type: VIRTUAL_BACKGROUND_TRACK_CHANGED - * }} - */ -export function virtualBackgroundTrackChanged() { - return { - type: VIRTUAL_BACKGROUND_TRACK_CHANGED - }; -} diff --git a/react/features/virtual-background/components/VirtualBackgroundDialog.tsx b/react/features/virtual-background/components/VirtualBackgroundDialog.tsx index f84148355..77fdf85a9 100644 --- a/react/features/virtual-background/components/VirtualBackgroundDialog.tsx +++ b/react/features/virtual-background/components/VirtualBackgroundDialog.tsx @@ -26,7 +26,7 @@ import { Tooltip } from '../../base/tooltip'; // @ts-ignore import { getLocalVideoTrack } from '../../base/tracks'; // @ts-ignore -import { toggleBackgroundEffect, virtualBackgroundTrackChanged } from '../actions'; +import { toggleBackgroundEffect } from '../actions'; import { BACKGROUNDS_LIMIT, IMAGES, type Image, VIRTUAL_BACKGROUND_TYPE } from '../constants'; // @ts-ignore import { toDataURL } from '../functions'; @@ -439,7 +439,6 @@ function VirtualBackground({ dispatch(hideDialog()); logger.info(`Virtual background type: '${typeof options.backgroundType === 'undefined' ? 'none' : options.backgroundType}' applied!`); - dispatch(virtualBackgroundTrackChanged()); }, [ dispatch, options, _localFlipX ]); // Prevent the selection of a new virtual background if it has not been applied by default