fix: popup spam
This commit is contained in:
parent
913d74b285
commit
867a4f36b3
1 changed files with 44 additions and 44 deletions
|
@ -176,10 +176,10 @@ class CommentsFragment : Fragment() {
|
|||
object : View.OnTouchListener {
|
||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||
if (event?.action == MotionEvent.ACTION_UP) {
|
||||
if (pagesLoaded < totalPages) {
|
||||
if (!binding.commentsList.canScrollVertically(1) && !isFetching &&
|
||||
(binding.commentsList.layoutManager as LinearLayoutManager).findLastVisibleItemPosition() == (binding.commentsList.adapter!!.itemCount - 1)
|
||||
) {
|
||||
if (pagesLoaded < totalPages) {
|
||||
binding.commentBottomRefresh.visibility = View.VISIBLE
|
||||
loadMoreComments()
|
||||
lifecycleScope.launch {
|
||||
|
@ -188,11 +188,11 @@ class CommentsFragment : Fragment() {
|
|||
binding.commentBottomRefresh.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
snackString("No more comments")
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue