Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index to key for contact search recommendations #20186

Merged
merged 1 commit into from Oct 7, 2019

Conversation

@buoyad
Copy link
Member

commented Oct 7, 2019

@buoyad buoyad requested a review from keybase/react-hackers Oct 7, 2019
keyExtractor={(item: SearchResult | ImportContactsEntry, index: number) => {
if (!isImportContactsEntry(item) && item.contact) {
// Ids for contacts are not guaranteed to be unique
return item.userId + index

This comment has been minimized.

Copy link
@zapu

zapu Oct 7, 2019

Contributor

why not key all rows like this?

This comment has been minimized.

Copy link
@zapu

zapu Oct 7, 2019

Contributor

(except for "Import contacts" row)

This comment has been minimized.

Copy link
@buoyad

buoyad Oct 7, 2019

Author Member

there's at least a chance that a recommendation row will be reused as a search result, and don't want to disqualify that from happening

@mmaxim
mmaxim approved these changes Oct 7, 2019
@buoyad buoyad merged commit 953d08a into master Oct 7, 2019
1 of 2 checks passed
1 of 2 checks passed
ci/circleci CircleCI is running your tests
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
@buoyad buoyad deleted the danny/searchrecs-dedupe-keys branch Oct 7, 2019
buoyad added a commit that referenced this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.