From a0838c87cde6c9fb26e030815db447c39bb37181 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 11 Jan 2018 21:26:25 -0600 Subject: [PATCH 1/3] fix(contacts-form): if there is an @ in the search we assume they are pasting pubkey@host format and ignore the host, searching only for the pubkey to the left of the @ --- app/reducers/contactsform.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/reducers/contactsform.js b/app/reducers/contactsform.js index a1f48a58..4b940db7 100644 --- a/app/reducers/contactsform.js +++ b/app/reducers/contactsform.js @@ -70,7 +70,11 @@ const searchQuerySelector = state => state.contactsform.searchQuery contactFormSelectors.filteredNetworkNodes = createSelector( networkNodesSelector, searchQuerySelector, - (nodes, searchQuery) => filter(nodes, node => node.alias.includes(searchQuery) || node.pub_key.includes(searchQuery)) + (nodes, searchQuery) => { + const query = searchQuery.includes('@') ? searchQuery.split('@')[0] : searchQuery + + return filter(nodes, node => node.alias.includes(query) || node.pub_key.includes(query)) + } ) contactFormSelectors.showManualForm = createSelector( From ec0a692983be9c80dbdde143aa3d9c6df8e08c25 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 11 Jan 2018 21:40:42 -0600 Subject: [PATCH 2/3] fix(contacts-form): by default show the first 20 nodes when opening the contacts form --- app/components/Contacts/ContactsForm.js | 2 +- app/reducers/contactsform.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/components/Contacts/ContactsForm.js b/app/components/Contacts/ContactsForm.js index 049aa246..4a33af26 100644 --- a/app/components/Contacts/ContactsForm.js +++ b/app/components/Contacts/ContactsForm.js @@ -138,7 +138,7 @@ class ContactsForm extends React.Component {