Improve typeahead search with inclusion of followed users (temporary solution) (#1612)
* Update follows cache to maintain some user info * Prioritize follows in composer autocomplete * Clean up logic and add new autocomplete to search * Update follow hook
This commit is contained in:
parent
19f8389fc7
commit
bd7db8af26
20 changed files with 197 additions and 142 deletions
|
@ -148,18 +148,18 @@ export const SearchScreen = withAuthRequired(
|
|||
style={pal.view}
|
||||
onScroll={onMainScroll}
|
||||
scrollEventThrottle={100}>
|
||||
{query && autocompleteView.searchRes.length ? (
|
||||
{query && autocompleteView.suggestions.length ? (
|
||||
<>
|
||||
{autocompleteView.searchRes.map((profile, index) => (
|
||||
{autocompleteView.suggestions.map((suggestion, index) => (
|
||||
<ProfileCard
|
||||
key={profile.did}
|
||||
testID={`searchAutoCompleteResult-${profile.handle}`}
|
||||
profile={profile}
|
||||
key={suggestion.did}
|
||||
testID={`searchAutoCompleteResult-${suggestion.handle}`}
|
||||
profile={suggestion}
|
||||
noBorder={index === 0}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
) : query && !autocompleteView.searchRes.length ? (
|
||||
) : query && !autocompleteView.suggestions.length ? (
|
||||
<View>
|
||||
<Text style={[pal.textLight, styles.searchPrompt]}>
|
||||
No results found for {autocompleteView.prefix}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue