-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixes view of sub-channel icon when not in use #7582
Fixes view of sub-channel icon when not in use #7582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
However this doesn't fix the problem completely:
NewPipe/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
Lines 1524 to 1531 in 2158802
if (!isEmpty(info.getSubChannelName())) { | |
displayBothUploaderAndSubChannel(info); | |
} else if (!isEmpty(info.getUploaderName())) { | |
displayUploaderAsSubChannel(info); | |
} else { | |
binding.detailUploaderTextView.setVisibility(View.GONE); | |
binding.detailUploaderThumbnailView.setVisibility(View.GONE); | |
} |
if we encounter the
else
-Block the view will still be visible.
I would suggest simply putting binding.detailSubChannelThumbnailView.setVisibility(View.GONE);
before the above code block (line 1523 or so) to fix the problem.
@litetex Yeah, I was unsure what to think of that else statement, as it seams like we would have already reached an error if it got to the point where there is no uploader name. Inside the |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
What is it?
Description of the changes in your PR
Removes a blank sub-channel icon if you watch a Peertube video and then a non-PeerTube video after.
Before/After Screenshots/Screen Record
Before:
https://peertube.co.uk/videos/watch/8afb877a-9f14-4178-b9fb-a0e0c6bfa215
At the end in the bottom right corner of the YouTube creator icon, the app still tries to show you the sub-channel icon like it would in PeerTube. This is because whey you load up a video it only checks whether it needs to create the icon for a video and never if it needs to be hidden.
After:
https://peertube.co.uk/videos/watch/e778dfb5-0bbf-4997-a02d-c8ccb241230b
At the end in the bottom right corner of the YouTube creator icon, the app no longer tries to show you the sub-channel icon.
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence