-
-
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
Fix uploader and subchannel avatars being swapped and disable loading thumbnail message failure on content details page #10066
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kudos, SonarCloud Quality Gate passed! |
TobiGr
added
bug
Issue is related to a bug
GUI
Issue is related to the graphical user interface
peertube
Service, https://joinpeertube.org/
labels
May 3, 2023
TobiGr
reviewed
May 3, 2023
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
AudricV
changed the title
Fix uploader and subchannel avatars being swapped
Fix uploader and subchannel avatars being swapped and disable loading thumbnail message failure on content details page
May 14, 2023
4 tasks
TobiGr
approved these changes
Jun 5, 2023
This was referenced Jul 31, 2023
Merged
6 tasks
Stypox
added a commit
to Stypox/NewPipe
that referenced
this pull request
Nov 16, 2023
The fix just involves removing some really outdated code (6 years ago) added in 33e29be#diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778 (blame: https://github.com/Stypox/NewPipe/blame/9318bb530619898c1e1f3f8a8c866f3d2e35ab0c/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java#L778). What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded. That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders. The problem is, starting from TeamNewPipe#10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image. But then why did the channel avatar image work normally sometimes? My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image. However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
Stypox
added a commit
to Stypox/NewPipe
that referenced
this pull request
Nov 16, 2023
The fix just involves removing some really outdated code (6 years ago) added in TeamNewPipe@33e29be#diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778 (blame: https://github.com/TeamNewPipe/NewPipe/blame/9318bb530619898c1e1f3f8a8c866f3d2e35ab0c/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java#L778). What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded. That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders. The problem is, starting from TeamNewPipe#10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image. But then why did the channel avatar image work normally sometimes? My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image. However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
5 tasks
Stypox
added a commit
that referenced
this pull request
Dec 7, 2023
The fix just involves removing some really outdated code (6 years ago) added in 33e29be#diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778 (blame: https://github.com/TeamNewPipe/NewPipe/blame/9318bb530619898c1e1f3f8a8c866f3d2e35ab0c/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java#L778). What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded. That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders. The problem is, starting from #10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image. But then why did the channel avatar image work normally sometimes? My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image. However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
Stypox
added a commit
that referenced
this pull request
Dec 10, 2023
The fix just involves removing some really outdated code (6 years ago) added in 33e29be#diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778 (blame: https://github.com/TeamNewPipe/NewPipe/blame/9318bb530619898c1e1f3f8a8c866f3d2e35ab0c/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java#L778). What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded. That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders. The problem is, starting from #10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image. But then why did the channel avatar image work normally sometimes? My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image. However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
javulticat
pushed a commit
to NewPipeX/NewPipeX
that referenced
this pull request
Dec 30, 2023
The fix just involves removing some really outdated code (6 years ago) added in TeamNewPipe@33e29be#diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778 (blame: https://github.com/TeamNewPipe/NewPipe/blame/9318bb530619898c1e1f3f8a8c866f3d2e35ab0c/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java#L778). What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded. That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders. The problem is, starting from TeamNewPipe#10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image. But then why did the channel avatar image work normally sometimes? My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image. However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is it?
Description of the changes in your PR
VideoDetailFragment
didn't really take into account the fact that when no sub-channel is present, the uploader is shown as sub-channel. So I fixed both of these things.Before/After Screenshots/Screen Record
Before:
After:
The NewPipe channel page is correct: https://tube.tchncs.de/video-channels/she_drives_mobility
Fixes the following issue(s)
Closes #7416.
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