- Implemented DockedCallPanel component to render the docked call interface when an active call is present. - Created RemoteCursorOverlay component to display remote cursor positions during screen sharing. - Added hooks for managing docked call state and remote cursor functionality. - Introduced pending drag state management for seamless transitions between docked and floating states. - Developed embed filter management components for personal and room-wide settings, allowing users to customize URL embed visibility. - Implemented auto-joining functionality for rooms within spaces, enhancing user experience during space navigation. - Added state management for tracking joining progress of rooms in spaces.
19 lines
670 B
TypeScript
19 lines
670 B
TypeScript
import { useSetting } from '../../state/hooks/settings';
|
|
import { settingsAtom } from '../../state/settings';
|
|
import { useCall } from './useCall';
|
|
import { CallState } from './types';
|
|
|
|
/**
|
|
* Hook to determine if the call panel should be rendered docked
|
|
* Returns true if there's an active call AND the panel is set to docked mode
|
|
*/
|
|
export function useIsCallDocked(): boolean {
|
|
const { activeCall } = useCall();
|
|
const [isDocked] = useSetting(settingsAtom, 'isCallPanelDocked');
|
|
|
|
const hasActiveCall = activeCall &&
|
|
(activeCall.state === CallState.Connecting || activeCall.state === CallState.Connected);
|
|
|
|
return Boolean(hasActiveCall && isDocked);
|
|
}
|