From 3a8d4302acef3fb9b2f7f187bdde7c2d36d7ba63 Mon Sep 17 00:00:00 2001 From: daledah Date: Wed, 4 Dec 2024 17:41:42 +0700 Subject: [PATCH 1/2] fix: some member appear as Hidden --- src/libs/PersonalDetailsUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/PersonalDetailsUtils.ts b/src/libs/PersonalDetailsUtils.ts index 3d9aed117ca3..31d344facb32 100644 --- a/src/libs/PersonalDetailsUtils.ts +++ b/src/libs/PersonalDetailsUtils.ts @@ -75,7 +75,7 @@ function getDisplayNameOrDefault(passedPersonalDetails?: Partial Date: Fri, 6 Dec 2024 14:48:37 +0700 Subject: [PATCH 2/2] refactor: change logics to more precise --- src/libs/PersonalDetailsUtils.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/libs/PersonalDetailsUtils.ts b/src/libs/PersonalDetailsUtils.ts index 31d344facb32..395ab930b116 100644 --- a/src/libs/PersonalDetailsUtils.ts +++ b/src/libs/PersonalDetailsUtils.ts @@ -52,6 +52,8 @@ const regexMergedAccount = new RegExp(CONST.REGEX.MERGED_ACCOUNT_PREFIX); function getDisplayNameOrDefault(passedPersonalDetails?: Partial | null, defaultValue = '', shouldFallbackToHidden = true, shouldAddCurrentUserPostfix = false): string { let displayName = passedPersonalDetails?.displayName ?? ''; + let login = passedPersonalDetails?.login ?? ''; + // If the displayName starts with the merged account prefix, remove it. if (regexMergedAccount.test(displayName)) { // Remove the merged account prefix from the displayName. @@ -60,8 +62,11 @@ function getDisplayNameOrDefault(passedPersonalDetails?: Partial