Support some lbry hosts to deep links. Add unit tests #1008

Merged
kekkyojin merged 3 commits from more-deeplinks into master 2020-10-02 13:34:39 +02:00
kekkyojin commented 2020-09-11 18:31:32 +02:00 (Migrated from github.com)

…sts for LbryUri parse() method

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe: Unit Tests

Fixes

Issue Number:

What is the current behavior?

LBRY.TV and other links are not captured by LBRY Android when clicked on other apps

What is the new behavior?

LBRY Android will be offered to users when they click on any LBRY.[TV|LAT|IN|FR] hosted link.

Other information

Furthermore, I have also added unit tests for the LbryUri.parse(String, bool) method. In order to run them, it could be required to edit the 'Shorten command line' configuration and change the value to 'JAR Manifest', which was the one I used to run them.

…sts for LbryUri parse() method ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [x] Other - Please describe: Unit Tests ## Fixes Issue Number: ## What is the current behavior? LBRY.TV and other links are not captured by LBRY Android when clicked on other apps ## What is the new behavior? LBRY Android will be offered to users when they click on any LBRY.[TV|LAT|IN|FR] hosted link. ## Other information Furthermore, I have also added unit tests for the LbryUri.parse(String, bool) method. In order to run them, it could be required to edit the 'Shorten command line' configuration and change the value to 'JAR Manifest', which was the one I used to run them. <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
akinwale (Migrated from github.com) reviewed 2020-09-11 18:31:32 +02:00
akinwale (Migrated from github.com) approved these changes 2020-09-16 16:30:12 +02:00
akinwale (Migrated from github.com) left a comment

This looks good, thanks. Do you still want to make some changes since it's still a draft?

This looks good, thanks. Do you still want to make some changes since it's still a draft?
kekkyojin commented 2020-09-16 17:40:23 +02:00 (Migrated from github.com)

Thanks for the review, @akinwale. I prefer to keep it still as a draft as I hadn't tested it long enough. Also I have seen that the app is not converting the HTTPS:// protocol schema to LBRY:// protocol schema on the app wonderbar address. The app shows the content but it shows for example https://@lbry:x instead of lbry://@lbry:x. This could have been introduced in previous PR for open.lbry.com. Just a minor/trivial problem, though.

Anyway, I still prefer to test it a little bit more and switch it to a final PR. Testing the current PR is right now my priority. If I see a quick fix for the https://->lbry:// I will also add a new commit here.

Thanks for the review, @akinwale. I prefer to keep it still as a draft as I hadn't tested it long enough. Also I have seen that the app is not converting the HTTPS:// protocol schema to LBRY:// protocol schema on the app wonderbar address. The app shows the content but it shows for example https://@lbry:x instead of lbry://@lbry:x. This could have been introduced in previous PR for open.lbry.com. Just a minor/trivial problem, though. Anyway, I still prefer to test it a little bit more and switch it to a final PR. Testing the current PR is right now my priority. If I see a quick fix for the https://->lbry:// I will also add a new commit here.
kekkyojin commented 2020-09-21 12:35:34 +02:00 (Migrated from github.com)

Test this using https://gist.github.com/kekkyojin/f00e4ce747197b96b964ee7e0fe29f61 for some links. By testing it sequentally, it is possible to see urls are updated after each link is parsed.

This doesn't happen for only-channel urls. Unit tests show it is correctly parsed, but wonderbar url shows the one user clicked, instead of the transformed one. The channel page shows, but both showed URL and a new bottom bar with latest content -or a blank one- is always shown. I am going to open a bug report about this. Pretty sure this defect was introduced when the deep-linking from open.lbry.com feature was added to the app. So completelly my fault.

I have rebased my latest commit. I suggest to test this PR again.

Test this using https://gist.github.com/kekkyojin/f00e4ce747197b96b964ee7e0fe29f61 for some links. By testing it sequentally, it is possible to see urls are updated after each link is parsed. This doesn't happen for only-channel urls. Unit tests show it is correctly parsed, but wonderbar url shows the one user clicked, instead of the transformed one. The channel page shows, but both showed URL and a new bottom bar with latest content -or a blank one- is always shown. I am going to open a bug report about this. Pretty sure this defect was introduced when the deep-linking from open.lbry.com feature was added to the app. So completelly my fault. I have rebased my latest commit. I suggest to test this PR again.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1008
No description provided.