-
-
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
Show comment replies #9410
Show comment replies #9410
Conversation
Co-authored-by: krlvm <[email protected]>
* Make "Show Replies" button text a little bigger * Add elevation to the toolbar Co-authored-by: xz-dev <[email protected]>
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.
I have tested these changes on my Android, and they look good. I'm able to connect replies and navigate back to the comments section. The rest of the app appears to be working correctly.
Co-authored-by: Isira Seneviratne <[email protected]>
NewPipe player with this branch has got issues on my phone.
Maybe b5c0823 should not be in this PR and it is creating problems? |
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 nice and understandable, you did a great job! Thanks for looking into this. Most of the review comments are small things, except for the clone
thingy, for which we might want to look into other solutions. Anyway, nothing too big.
I am getting some problems loading the next page of the 488 replies of the first comment on this video. The loading indicator just spins forever. I would not consider this blocking as the comments on which there are so many replies are not so many, but it would be nice if you could fix this, too, before merging. ;-)
<ImageButton | ||
android:id="@+id/backButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="@dimen/activity_horizontal_margin" | ||
android:background="?attr/selectableItemBackgroundBorderless" | ||
android:contentDescription="@string/back" | ||
android:src="@drawable/ic_arrow_back" /> |
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.
I think you can just use android:navigationIcon and android:navigationContentDescription instead of adding a button manually
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.
I can not use your way to do that, it will show nothing at here.
There is another way can do that, but it's even more complex.
// clone comment object to avoid relatedItems and nextPage actually set null | ||
info = CommentUtils.clone(info); |
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.
Mmmh, I don't like this that much. Can you explain further why you need to clone the object is a way that is so low-level?
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.
When you check CommentReplyFragment
, you will know.
Because I need create a fake CommentsInfo
for the CommentFragment
, then I can simply put two CommentFragment
together.
itemContentReplyButton.setOnClickListener( | ||
view -> itemBuilder.getOnCommentsReplyListener().selected(item) | ||
); | ||
final int replyCount = item.getReplyCount(); |
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.
Shouldn't you setVisibility(View.GONE)
when the reply count is 0?
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.
If no reply, item.getReplies()
will return null, so not need to set at here.
<org.schabi.newpipe.views.NewPipeTextView | ||
android:id="@+id/itemTitleView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_alignBottom="@+id/backButton" | ||
android:layout_marginTop="@dimen/activity_horizontal_margin" | ||
android:layout_toEndOf="@+id/backButton" | ||
android:ellipsize="marquee" | ||
android:fadingEdge="horizontal" | ||
android:marqueeRepeatLimit="marquee_forever" | ||
android:scrollHorizontally="true" | ||
android:singleLine="true" | ||
android:text="@string/replies" | ||
android:textAppearance="?android:attr/textAppearanceLarge" | ||
android:textSize="@dimen/channel_item_detail_title_text_size" /> |
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.
And you also can do this with just android:title. Also, maybe instead of just showing "Replies" as title, it would be nice if it also contained the number, e.g. "12 replies".
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.
No, you can't, as #9410 (comment) say
this.url = u; | ||
this.name = !TextUtils.isEmpty(title) ? title : ""; | ||
// clone comment object to avoid replies actually set null | ||
this.comment = CommentUtils.clone(preComment); |
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.
Also here
Do you have any log or give me a screen recording to help me understand what happening? |
CreenRecord: https://ufile.io/pwdj823r When it crashes like this it does it with every video. The only way to fix it is to play a video in foreground. After that i can play in background by longpressing again. Exception
Crash log
|
This screenrecord shows problems while rotating the screen: https://ufile.io/8dfzxp2m |
Another crash with rotation: Screen record: https://ufile.io/aj35l7bb Exception
Crash log
|
I got the following glitch while working on the SoundCloud replies: bug.webmI have no idea how i created it. I just opened the stream from the history and scrolled up and down a few times. |
Co-authored-by: Stypox <[email protected]>
0c5433e
to
d2059db
Compare
Kudos, SonarCloud Quality Gate passed! |
Is this still being worked on? |
I've been busy doing other things lately, I'll probably see later if there's anything else I can do. |
Yes, this will be merged in 0.26.0, don't worry and stop asking |
I've experienced the same crash reported in #9410 (comment) frequently lately, so I wanted to add that to reproduce it you have to be on description tab and rotate the video. I'm able to reproduce it reliably like that. |
Closing in favour of #10018, since it is a simpler implementation and should also have less bugs. Thank you nonetheless for your work! |
From #9020, for change branch name
What is it?
Description of the changes in your PR
Adds a "Show Replies" for the comments with replies for Youtube, just look like youtube.
Before/After Screenshots/Screen Record
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