removing a useless comment + style cleanup

This commit is contained in:
Tibor Kaputa 2022-07-31 16:56:53 +02:00 committed by GitHub
parent f423ea1bd7
commit 0035e6440c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,16 +2,9 @@ package com.simplemobiletools.keyboard.extensions
import androidx.recyclerview.widget.RecyclerView
/**
* Calls the [scroll] callback when the receiving RecyclerView's scroll position is changed.
*/
fun RecyclerView.onScroll(scroll: (Int) -> Unit) {
addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(
recyclerView: RecyclerView,
dx: Int,
dy: Int,
) {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
scroll(computeVerticalScrollOffset())
}