Skip to content

Commit

Permalink
fix: remove older logic for showing hand raise
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Mar 18, 2024
1 parent 4e1b42e commit f59aaef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'reac
import { useMedia } from 'react-use';
import data from '@emoji-mart/data';
import Picker from '@emoji-mart/react';
import { HMSException, selectLocalPeer, useAVToggle, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
import { HMSException, selectLocalPeer, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
import { EmojiIcon, PauseCircleIcon, SendIcon, VerticalMenuIcon } from '@100mslive/react-icons';
import { Box, config as cssConfig, Flex, IconButton as BaseIconButton, Popover, styled, Text } from '../../..';
import { IconButton } from '../../../IconButton';
Expand Down Expand Up @@ -89,8 +89,6 @@ export const ChatFooter = ({ onSend, children }: { onSend: (count: number) => vo
const defaultSelection = useDefaultChatSelection();
const selection = selectedPeer.name || selectedRole || defaultSelection;
const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
const { toggleAudio, toggleVideo } = useAVToggle();
const noAVPermissions = !(toggleAudio || toggleVideo);
const isMwebHLSStream = useMobileHLSStream();
const isLandscapeHLSStream = useLandscapeHLSStream();

Expand Down Expand Up @@ -275,7 +273,7 @@ export const ChatFooter = ({ onSend, children }: { onSend: (count: number) => vo
}}
gap="2"
>
{noAVPermissions ? <RaiseHand css={{ bg: '$surface_default' }} /> : null}
<RaiseHand css={{ bg: '$surface_default' }} />
<MoreSettings elements={elements} screenType={screenType} />
</Flex>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
selectAppData,
selectIsConnectedToRoom,
selectRoomState,
useAVToggle,
useHMSActions,
useHMSStore,
} from '@100mslive/react-sdk';
Expand Down Expand Up @@ -54,8 +53,6 @@ export const ConferenceScreen = () => {
const dropdownListRef = useRef<string[]>();
const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);

const { toggleAudio, toggleVideo } = useAVToggle();
const noAVPermissions = !(toggleAudio || toggleVideo);
// using it in hls stream to show action button when chat is disabled
const showChat = !!screenProps.elements?.chat;
const autoRoomJoined = useRef(isPreviewScreenEnabled);
Expand Down Expand Up @@ -202,7 +199,7 @@ export const ConferenceScreen = () => {
justify="end"
gap="2"
>
{noAVPermissions ? <RaiseHand /> : null}
<RaiseHand />
<MoreSettings elements={screenProps.elements} screenType={screenProps.screenType} />
<Box
css={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect } from 'react';
import { useMedia } from 'react-use';
import { ConferencingScreen } from '@100mslive/types-prebuilt';
import { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';
import { useAVToggle } from '@100mslive/react-sdk';
import { config as cssConfig, Footer as AppFooter } from '../../..';
// @ts-ignore: No implicit Any
import { AudioVideoToggle } from '../AudioVideoToggle';
Expand Down Expand Up @@ -41,8 +40,6 @@ export const Footer = ({
const isOverlayChat = !!elements?.chat?.is_overlay;
const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;

const { toggleAudio, toggleVideo } = useAVToggle();
const noAVPermissions = !(toggleAudio || toggleVideo);
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
const { showPolls } = useShowPolls();
Expand Down Expand Up @@ -90,7 +87,7 @@ export const Footer = ({
>
{isMobile ? (
<>
{noAVPermissions ? <RaiseHand /> : null}
<RaiseHand />
{elements?.chat && <ChatToggle />}
<MoreSettings elements={elements} screenType={screenType} />
</>
Expand Down

0 comments on commit f59aaef

Please sign in to comment.