fix(aot) remove dependency to store (#13910)

pull/13915/head jitsi-meet_9009
Horatiu Muresan 2 years ago committed by GitHub
parent 50b064907a
commit b4d12d74f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      react/features/always-on-top/AlwaysOnTop.tsx
  2. 6
      react/features/base/avatar/components/Avatar.tsx
  3. 4
      react/features/base/avatar/components/web/StatelessAvatar.tsx
  4. 5
      react/features/base/avatar/types.ts
  5. 2
      react/features/speaker-stats/components/web/SpeakerStatsItem.tsx

@ -4,6 +4,7 @@ import React, { Component } from 'react';
// in this environment (e.g. JitsiMeetJS or interfaceConfig)
import StatelessAvatar from '../base/avatar/components/web/StatelessAvatar';
import { getAvatarColor, getInitials } from '../base/avatar/functions';
import { DEFAULT_ICON } from '../base/icons/svg/constants';
import Toolbar from './Toolbar';
@ -184,6 +185,7 @@ export default class AlwaysOnTop extends Component<any, IState> {
<div id = 'avatarContainer'>
<StatelessAvatar
color = { getAvatarColor(displayName, customAvatarBackgrounds) }
iconUser = { DEFAULT_ICON.IconUser }
id = 'avatar'
initials = { getInitials(displayName) }
url = { avatarURL } />)

@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { IconUser } from '../../icons/svg';
import { getParticipantById } from '../../participants/functions';
import { IParticipant } from '../../participants/types';
import { getAvatarColor, getInitials, isCORSAvatarURL } from '../functions';
@ -182,6 +183,7 @@ class Avatar<P extends IProps> extends PureComponent<P, IState> {
const avatarProps: AbstractProps & {
className?: string;
iconUser?: any;
id?: string;
status?: string;
testId?: string;
@ -226,6 +228,10 @@ class Avatar<P extends IProps> extends PureComponent<P, IState> {
avatarProps.initials = initials;
}
if (navigator.product !== 'ReactNative') {
avatarProps.iconUser = IconUser;
}
return (
<StatelessAvatar
{ ...avatarProps } />

@ -2,7 +2,6 @@ import React, { useCallback } from 'react';
import { makeStyles } from 'tss-react/mui';
import Icon from '../../../icons/components/Icon';
import { IconUser } from '../../../icons/svg';
import { withPixelLineHeight } from '../../../styles/functions.web';
import { isIcon } from '../../functions';
import { IAvatarProps } from '../../types';
@ -122,6 +121,7 @@ const useStyles = makeStyles()(theme => {
const StatelessAvatar = ({
className,
color,
iconUser,
id,
initials,
onAvatarLoadError,
@ -212,7 +212,7 @@ const StatelessAvatar = ({
style = { _getAvatarStyle() }>
<Icon
size = { '50%' }
src = { IconUser } />
src = { iconUser } />
</div>
);
};

@ -5,6 +5,11 @@ export interface IAvatarProps {
*/
color?: string;
/**
* The user icon(browser only).
*/
iconUser?: any;
/**
* Initials to be used to render the initials based avatars.
*/

@ -4,6 +4,7 @@ import React from 'react';
import Avatar from '../../../base/avatar/components/Avatar';
import StatelessAvatar from '../../../base/avatar/components/web/StatelessAvatar';
import { getInitials } from '../../../base/avatar/functions';
import { IconUser } from '../../../base/icons/svg';
import BaseTheme from '../../../base/ui/components/BaseTheme.web';
import { FaceLandmarks } from '../../../face-landmarks/types';
@ -78,6 +79,7 @@ const SpeakerStatsItem = (props: IProps) => {
<StatelessAvatar
className = 'userAvatar'
color = { BaseTheme.palette.ui04 }
iconUser = { IconUser }
initials = { getInitials(props.displayName) }
size = { 32 } />
) : (

Loading…
Cancel
Save