Restore useful bubble for incoming messages with errors

This commit is contained in:
Scott Nonnenberg 2022-05-31 09:26:07 -07:00 committed by GitHub
parent 6668348197
commit 6f2b01d98b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 4 deletions

View file

@ -7,12 +7,12 @@ import { noop } from 'lodash';
import classNames from 'classnames';
import type { VideoFrameSource } from 'ringrtc';
import type {
ActiveCallStateType,
SetLocalAudioType,
SetLocalPreviewType,
SetLocalVideoType,
SetRendererCanvasType,
} from '../state/ducks/calling';
import { isInSpeakerView } from '../state/selectors/calling';
import { Avatar } from './Avatar';
import { CallingHeader } from './CallingHeader';
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo';
@ -25,6 +25,7 @@ import type {
} from '../types/Calling';
import {
CallMode,
CallViewMode,
CallState,
GroupCallConnectionState,
GroupCallJoinState,
@ -77,6 +78,15 @@ type DirectCallHeaderMessagePropsType = {
joinedAt?: number;
};
export const isInSpeakerView = (
call: Pick<ActiveCallStateType, 'viewMode'> | undefined
): boolean => {
return Boolean(
call?.viewMode === CallViewMode.Presentation ||
call?.viewMode === CallViewMode.Speaker
);
};
function DirectCallHeaderMessage({
callState,
i18n,