From db4ea48eb56230c22efaa2646f43268917a199e0 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Sat, 10 Feb 2024 13:20:07 +0100 Subject: [PATCH] Fix bug with Hidden is not shown on the header of avatar for Hidden contact --- src/pages/settings/Profile/ProfileAvatar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Profile/ProfileAvatar.tsx b/src/pages/settings/Profile/ProfileAvatar.tsx index aa39b8eb761f..450740d09da4 100644 --- a/src/pages/settings/Profile/ProfileAvatar.tsx +++ b/src/pages/settings/Profile/ProfileAvatar.tsx @@ -5,6 +5,7 @@ import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; import type {AuthScreensParamList} from '@libs/Navigation/types'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as UserUtils from '@libs/UserUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import * as PersonalDetails from '@userActions/PersonalDetails'; @@ -24,6 +25,7 @@ function ProfileAvatar({route, personalDetails, isLoadingApp = true}: ProfileAva const avatarURL = personalDetail?.avatar ?? ''; const accountID = Number(route.params.accountID ?? ''); const isLoading = personalDetail?.isLoading ?? (isLoadingApp && !Object.keys(personalDetail ?? {}).length); + const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail); useEffect(() => { if (!ValidationUtils.isValidAccountRoute(Number(accountID)) ?? !!avatarURL) { @@ -34,7 +36,7 @@ function ProfileAvatar({route, personalDetails, isLoadingApp = true}: ProfileAva return ( {