Skip to content

Commit

Permalink
revert back changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ishpaul777 committed Mar 2, 2024
1 parent acfdae8 commit db38f3b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libs/PersonalDetailsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ function getDisplayNameOrDefault(
passedPersonalDetails?: Partial<PersonalDetails> | null,
defaultValue = '',
shouldFallbackToHidden = true,
shouldUsePostfix = false,
postfix = Localize.translateLocal('common.you').toLowerCase(),
shouldAddCurrentUserPostfix = false,
): string {
let displayName = passedPersonalDetails?.displayName ? passedPersonalDetails.displayName.replace(CONST.REGEX.MERGED_ACCOUNT_PREFIX, '') : '';
if (shouldUsePostfix && !!displayName) {
displayName = `${displayName} (${postfix})`;
if (shouldAddCurrentUserPostfix && !!displayName) {
displayName = `${displayName} (${Localize.translateLocal('common.you').toLowerCase()})`;
}

const fallbackValue = shouldFallbackToHidden ? Localize.translateLocal('common.hidden') : '';
Expand Down

0 comments on commit db38f3b

Please sign in to comment.