Skip to content

Commit

Permalink
Merge pull request #36290 from ZhenjaHorbach/hidden-is-not-shown-on-h…
Browse files Browse the repository at this point in the history
…eader-of-avatar-for-hidden-contact

Fix bug with Hidden is not shown on the header of avatar for Hidden contact
  • Loading branch information
tylerkaraszewski authored Feb 15, 2024
2 parents 0381d57 + db4ea48 commit d88bdf3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/settings/Profile/ProfileAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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) {
Expand All @@ -34,7 +36,7 @@ function ProfileAvatar({route, personalDetails, isLoadingApp = true}: ProfileAva

return (
<AttachmentModal
headerTitle={personalDetail?.displayName ?? ''}
headerTitle={displayName}
defaultOpen
source={UserUtils.getFullSizeAvatar(avatarURL, accountID)}
onModalClose={() => {
Expand Down

0 comments on commit d88bdf3

Please sign in to comment.