From ffae329df188463f5594409435fbd5cb99044507 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 28 Oct 2025 14:48:32 +0800 Subject: [PATCH 1/2] only show the import contacts message for valid keyword but no result found --- src/pages/iou/request/MoneyRequestParticipantsSelector.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index 8adb3b740ee37..708edfc5d75d0 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -114,7 +114,6 @@ function MoneyRequestParticipantsSelector({ const {contactPermissionState, contacts, setContactPermissionState, importAndSaveContacts} = useContactImport(); const platform = getPlatform(); const isNative = platform === CONST.PLATFORM.ANDROID || platform === CONST.PLATFORM.IOS; - const showImportContacts = isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(''); const referralContentType = CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE; const {isOffline} = useNetwork(); @@ -274,6 +273,8 @@ function MoneyRequestParticipantsSelector({ countryCode, ], ); + const showImportContacts = isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED) && inputHelperText === translate('common.noResultsFound'); + /** * Returns the sections needed for the OptionsSelector * @returns {Array} From 6d4f320a7b6c8884a2be7226e9ea0d6ba872e2e6 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 28 Oct 2025 14:55:23 +0800 Subject: [PATCH 2/2] prettier --- src/pages/iou/request/MoneyRequestParticipantsSelector.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index 708edfc5d75d0..24b6dc04c9664 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -273,7 +273,8 @@ function MoneyRequestParticipantsSelector({ countryCode, ], ); - const showImportContacts = isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED) && inputHelperText === translate('common.noResultsFound'); + const showImportContacts = + isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED) && inputHelperText === translate('common.noResultsFound'); /** * Returns the sections needed for the OptionsSelector