mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
commit
a32e4a8776
@ -18,7 +18,7 @@ import kotlinx.coroutines.withContext
|
|||||||
|
|
||||||
class CommentsSheet(
|
class CommentsSheet(
|
||||||
private val videoId: String,
|
private val videoId: String,
|
||||||
private val comments: MutableList<Comment>,
|
private val comments: List<Comment>,
|
||||||
private var nextPage: String?,
|
private var nextPage: String?,
|
||||||
private val onMoreComments: (comments: List<Comment>, nextPage: String?) -> Unit
|
private val onMoreComments: (comments: List<Comment>, nextPage: String?) -> Unit
|
||||||
) : ExpandedBottomSheet() {
|
) : ExpandedBottomSheet() {
|
||||||
@ -45,7 +45,7 @@ class CommentsSheet(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
commentsAdapter = CommentsAdapter(videoId, comments) {
|
commentsAdapter = CommentsAdapter(videoId, comments.toMutableList()) {
|
||||||
dialog?.dismiss()
|
dialog?.dismiss()
|
||||||
}
|
}
|
||||||
binding.commentsRV.adapter = commentsAdapter
|
binding.commentsRV.adapter = commentsAdapter
|
||||||
@ -60,7 +60,6 @@ class CommentsSheet(
|
|||||||
val response = try {
|
val response = try {
|
||||||
RetrofitInstance.api.getComments(videoId)
|
RetrofitInstance.api.getComments(videoId)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG(), e.toString())
|
|
||||||
return@launchWhenCreated
|
return@launchWhenCreated
|
||||||
}
|
}
|
||||||
binding.progress.visibility = View.GONE
|
binding.progress.visibility = View.GONE
|
||||||
|
Loading…
Reference in New Issue
Block a user