Skip to content

Commit ffae329

Browse files
committed
only show the import contacts message for valid keyword but no result found
1 parent 805a21f commit ffae329

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/pages/iou/request/MoneyRequestParticipantsSelector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ function MoneyRequestParticipantsSelector({
114114
const {contactPermissionState, contacts, setContactPermissionState, importAndSaveContacts} = useContactImport();
115115
const platform = getPlatform();
116116
const isNative = platform === CONST.PLATFORM.ANDROID || platform === CONST.PLATFORM.IOS;
117-
const showImportContacts = isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED);
118117
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState('');
119118
const referralContentType = CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SUBMIT_EXPENSE;
120119
const {isOffline} = useNetwork();
@@ -274,6 +273,8 @@ function MoneyRequestParticipantsSelector({
274273
countryCode,
275274
],
276275
);
276+
const showImportContacts = isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED) && inputHelperText === translate('common.noResultsFound');
277+
277278
/**
278279
* Returns the sections needed for the OptionsSelector
279280
* @returns {Array}

0 commit comments

Comments
 (0)