Open mplorentz opened 2 weeks ago
Make sure you also take in to account #1568 and that the mentions are sorted in order of engagement on the thread first and secondarily based on the number of mutual contacts with that person.
@rabble oh I didn't know about that ticket and filed a draft ticket that for this same thing. Thanks for linking the existing one. I moved it into the sprint.
Currently the search function that powers our autocomplete of user mentions only searches Core Data locally. It should also search the relays in the user's relay list (and nostr.band). This fulfills the last part of the following user story:
Note: This ticket does not include the change to prioritize people participating in the thread at the top of the search results.
Implementation
We have already implemented searching for users by name on our Discover tab. This implementation uses a
SearchController
with a simple interface. The view set thequery
to the string the user is searching for and theSearchController
populates theauthorResults
array with the results that should be displayed in the view. The current autocomplete UI usesAuthorListView.search()
to build the list of search results from Core Data. RefactoringAuthorListView
to use theSearchController
is a good starting point for this ticket.