remove spaces and other invalid characters in direct resolve term, take into account channels too #1120
Labels
No labels
android: closed alpha
android: open beta
app-parity
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
creator
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
product review
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-android#1120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
i.e. if you type Naomi Brockwell, it should try to resolve naomibrockwell and @naomibrockwell, and return the top like we do on lbry-desktop
https://twitter.com/SovereigNaan/status/1350146627391152128
I cannot derive from the desktop code how the search query is transformed into the urls that are resolved so as to replicate here and present a PR, but if anyone knows better:
The resolution to get the featured item is launched from the LighthouseSearchTask in class SearchFragment, where the original query (eg "naomi brockwell") is transformed into ("lbry://naomi brockwell) via class LbryUri. While we are passing a single url, the task launching the resolution, ResolveTask, is ready to receive more than one. I added a second one ("lbry://@naomibrockwell") and then the expected featured item appeared (see screenshot). Obviously, with more than one url, more than one result may be received, and right now only one is considered for display.
By the way, search results do include @naomibrockwell for query "naomi brockwell", which is why that item is duplicated in the screenshot, so for regular results this derivation is done in the server. Note that this duplication does not happen in desktop (screenshot below), so it really pays to know how this is handled there to work it out in Android.
LbryUri in lbry-redux and url.go in url.go ("matching" LbryUri.java in lbry-android) may be a good place too look at, but maybe the transformation is done somewhere else.
Hope it is of some help.