-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Added Comments :) #186
Added Comments :) #186
Conversation
@Bnyro Leaving my finger while scrolling down comments minimizes the video player. |
Got it fixed :D |
Just added that you can load more comments through nextpage by scrolling down while being at the comments page, the pr should be ready to become merged now. Requesting reviews :D |
@Bnyro Almost great! (crashed one time while loading more comments) |
Same here xD |
How often did you load new comments? I could just limit it to prevent the ram to be full |
If the ram is the issue, idk |
I was just scrolling down at full speed |
Ok, the ram is not the issue, tested it xD |
Uh, ok. Any idea what the reason for the crash could be? |
@Bnyro The UI freezes while loading comments, swiping with my finger might have crashed it because it was frozen. |
Yeah, that's possible |
Let's wait for Kavins or Farbods review |
Is there a ram leakage? |
Idk, Dev options say it took 400mb at maximum so that shouldn't be the issue |
It's not a memory leak, I had a look while profiling, the layout calculations take too much time, so the application freezes. |
app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt
Outdated
Show resolved
Hide resolved
@@ -16,7 +16,7 @@ class CommentsAdapter(private val comments: MutableList<Comment>): RecyclerView | |||
|
|||
fun updateItems(newItems: List<Comment>){ | |||
comments.addAll(newItems) | |||
notifyDataSetChanged() | |||
notifyItemRangeInserted(comments.size, newItems.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.
You should calculate comments.size
before adding the newItems
:)
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.
Hmm what's the difference?
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.
Added it but I don't know what saving it in a var should change xD
Can you add comment replies? @Bnyro |
@enessgokalp I think it’s currently not supported by the Piped API |
It is supported, to get replies, you will have to fetch nextpage for it with the page in |
Why isn't this in the docs? :) |
No description provided.