Skip to content

Commit

Permalink
Fix bug with Hidden is not shown on the header of avatar for Hidden c…
Browse files Browse the repository at this point in the history
…ontact
  • Loading branch information
ZhenjaHorbach committed Feb 10, 2024
1 parent 198ca2c commit db4ea48
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 db4ea48

Please sign in to comment.