KedditBySteps
KedditBySteps copied to clipboard
Simplify InfiniteScrollListener
It appears that you don't need to store visibleItemCount
, totalItemCount
and firstVisibleItem
as member variables of the listener, since they are recalculated on every invocation of onScrolled
and aren't used anywhere else.
Also, I guess it is a good coding practice to store VISIBLE_THRESHOLD
as a const val
in the listener's companion object