-
-
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
Update NewPipeExtractor and properly linkify comments #9631
Conversation
393499f
to
29fca1a
Compare
8325bc0
to
608c2fa
Compare
app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java
Show resolved
Hide resolved
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.
Code looks good. I tested briefly and did not find any bugs related to the changed linking.
There are a few bugs related to other extractor PRs which are introduced to NP in this PR, but are fixed separately. The extractor version can be updated independently.
I'm merging this now so that we can have it in the RC |
we should also update the extractor commit. otherwise, there will be reports about broken comments |
What is it?
Description of the changes in your PR
Description
and not aString
anymoreTextLinkifier
:DescriptionFragment
toTextLinkifier
TextLinkifier
to not contain the redundant "link" word already contained in "Linkifier"TextLinkifier
methods to be notified when the text has been set to theTextView
, needed to set ellipsis and movement method in commentsTextLinkifier
only needs stream url and service id to generate popup-timestamps and hashtags, and since comments only have that information and not a fullInfo
, now theTextLinkifier
methods take those two parameters instead of an `Info.getText()
does not return aSpannable
, but rather aSpanned
(even though inTextLinkifier
aSpannableBuilder
is used). This means that the text selection (i.e. the highlight that appears when tapping on links) can't be manually set by us as done before inCommentTextOnTouchListener
, unfortunately.LongPressLinkMovementMethod
needs to be implemented inCommentTextOnTouchListener
.Fixes the following issue(s)
It definitely fixes some problems with comments, but I couldn't find any related issue.
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