diff --git a/native/chat/message-list-header-title.react.js b/native/chat/message-list-header-title.react.js --- a/native/chat/message-list-header-title.react.js +++ b/native/chat/message-list-header-title.react.js @@ -8,14 +8,18 @@ import * as React from 'react'; import { View, Platform } from 'react-native'; +import { useGetAvatarForThread } from 'lib/shared/avatar-utils.js'; +import type { ClientAvatar } from 'lib/types/avatar-types.js'; import type { ThreadInfo } from 'lib/types/thread-types.js'; import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import { firstLine } from 'lib/utils/string-utils.js'; import type { ChatNavigationProp } from './chat.react.js'; +import Avatar from '../components/avatar.react.js'; import Button from '../components/button.react.js'; import { ThreadSettingsRouteName } from '../navigation/route-names.js'; import { useStyles } from '../themes/colors.js'; +import { useShouldRenderAvatars } from '../utils/avatar-utils.js'; type BaseProps = { +threadInfo: ThreadInfo, @@ -28,6 +32,8 @@ ...BaseProps, +styles: typeof unboundStyles, +title: string, + +avatarInfo: ClientAvatar, + +shouldRenderAvatars: boolean, }; class MessageListHeaderTitle extends React.PureComponent { render() { @@ -38,19 +44,35 @@ areSettingsEnabled, styles, title, + avatarInfo, + shouldRenderAvatars, ...rest } = this.props; - let icon, fakeIcon; + // @GINSU: Before submitting review check android + let icon; if (Platform.OS === 'ios' && areSettingsEnabled) { icon = ( ); + } + + let fakeIcon; + if (Platform.OS === 'ios' && areSettingsEnabled && !shouldRenderAvatars) { fakeIcon = ( ); } + let avatar; + if (!isSearchEmpty && shouldRenderAvatars) { + avatar = ( + + + + ); + } + return (