diff --git a/src/libs/UserUtils.ts b/src/libs/UserUtils.ts index 3e309fc740217..85a3e076684c3 100644 --- a/src/libs/UserUtils.ts +++ b/src/libs/UserUtils.ts @@ -64,7 +64,7 @@ function hasLoginListError(loginList: OnyxEntry): boolean { * has an unvalidated contact method. */ function hasLoginListInfo(loginList: OnyxEntry): boolean { - return !Object.values(loginList ?? {}).every((field) => field.validatedDate); + return Object.values(loginList ?? {}).some((login) => session?.email !== login.partnerUserID && !login.validatedDate); } /** diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx index 6c6d4268eccd6..92a246949c53f 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx @@ -41,9 +41,9 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) { // Sort the login names by placing the one corresponding to the default contact method as the first item before displaying the contact methods. // The default contact method is determined by checking against the session email (the current login). const sortedLoginNames = loginNames.sort((loginName) => (loginList?.[loginName].partnerUserID === session?.email ? -1 : 1)); - const loginMenuItems = sortedLoginNames.map((loginName) => { const login = loginList?.[loginName]; + const isDefaultContactMethod = session?.email === login?.partnerUserID; const pendingAction = login?.pendingFields?.deletedLogin ?? login?.pendingFields?.addedLogin ?? undefined; if (!login?.partnerUserID && !pendingAction) { return null; @@ -60,7 +60,9 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) { let indicator; if (Object.values(login?.errorFields ?? {}).some((errorField) => !isEmptyObject(errorField))) { indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; - } else if (!login?.validatedDate) { + } else if (!login?.validatedDate && !isDefaultContactMethod) { + indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO; + } else if (!login?.validatedDate && isDefaultContactMethod && loginNames.length > 1) { indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO; }