Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab layout visibility with age restricted videos #5563

Merged
merged 2 commits into from
Feb 14, 2021

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Feb 12, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This fixes the tab layout visibility in video detail fragment when showing age restricted videos:

  • never show tab layout if view pager is hidden
  • always show view pager and tab layout again when a new stream info has to be shown in video detail fragment

Fixes the following issue(s)

APK testing

On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.

Due diligence

@Stypox Stypox mentioned this pull request Feb 12, 2021
14 tasks
@TobiGr
Copy link
Member

TobiGr commented Feb 12, 2021

Please add comments into the code.
That does not work on TV:

Screenshots

@nadiration
Copy link
Contributor

The layout problem is gone but could you make the play button to refresh the video since now when you go and enable restricted content on settings and come back to the video it doesn't [auto] refesh and the play button (on the minimized video) does nothing thus requiring you to close the video then you have to find the video again and play.
It would also be great if you hide tab layout for unsupported/geolocked or all other unavailable/unplayable videos. No pressure just pointing out. Thanks.

@TobiGr TobiGr added bug Issue is related to a bug GUI Issue is related to the graphical user interface labels Feb 13, 2021
@Stypox
Copy link
Member Author

Stypox commented Feb 14, 2021

@TobiGr I added comments. Regarding your Android-TV issue: that's not tv-specific and is expected behaviour. The tab layout is visible because the view pager is actually visible and has its tabs, since e.g. the comments could have been loaded regardless of whether the video shows a network error or not. Should the view pager be hidden completely in case of main-video network errors?

@Stypox
Copy link
Member Author

Stypox commented Feb 14, 2021

@TobiGr I now pushed a commit that completely hides tabs both on age restricted content and on network errors (it can be reverted if unwanted).
One issue, which was there also in previous versions and was not caused by secondary-controls, is that the view pager layout is not scrollable when hidden, leading to strange behaviour. I already fixed this across all NewPipe in #5148 (in particular this commit), basically by setting both the view pager and the recycler view alpha value to 0.0f instead of making it GONE, so that it keeps listening for touches. But this solution would require changes in many places (see how many files the commit changed) and proper testing, so I wouldn't include it in 0.20.10, also because it is not a regression.

@TobiGr TobiGr merged commit a26baa3 into TeamNewPipe:dev Feb 14, 2021
tossj pushed a commit to tossj/NewPipe-legacy that referenced this pull request Apr 21, 2021
…-visibility

Fix tab layout visibility with age restricted videos
@Stypox Stypox deleted the fix-tablayout-visibility branch August 4, 2022 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants