mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
fix that comments stop loading on scroll
This commit is contained in:
parent
08e9cfefff
commit
f1e16191b7
@ -43,7 +43,7 @@ class CommentsSheet(
|
||||
}
|
||||
|
||||
if (comments.isNotEmpty()) {
|
||||
commentsAdapter = CommentsAdapter(videoId, comments)
|
||||
setCommentsAdapter(comments)
|
||||
} else {
|
||||
fetchComments()
|
||||
}
|
||||
@ -52,6 +52,7 @@ class CommentsSheet(
|
||||
private fun setCommentsAdapter(comments: MutableList<Comment>) {
|
||||
commentsAdapter = CommentsAdapter(videoId, comments)
|
||||
binding.optionsRecycler.adapter = commentsAdapter
|
||||
isLoading = false
|
||||
}
|
||||
|
||||
private fun fetchComments() {
|
||||
@ -65,7 +66,6 @@ class CommentsSheet(
|
||||
setCommentsAdapter(response.comments)
|
||||
nextPage = response.nextpage
|
||||
onMoreComments.invoke(response.comments, response.nextpage)
|
||||
isLoading = false
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user