mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-09-18 10:34:03 +00:00
Lint: Move declarations into assignments
This commit is contained in:
@@ -14,12 +14,10 @@ public abstract class OnScrollBelowItemsListener extends RecyclerView.OnScrollLi
|
|||||||
super.onScrolled(recyclerView, dx, dy);
|
super.onScrolled(recyclerView, dx, dy);
|
||||||
if (dy > 0) {
|
if (dy > 0) {
|
||||||
int pastVisibleItems = 0;
|
int pastVisibleItems = 0;
|
||||||
final int visibleItemCount;
|
|
||||||
final int totalItemCount;
|
|
||||||
final RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
|
final RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
|
||||||
|
|
||||||
visibleItemCount = layoutManager.getChildCount();
|
final int visibleItemCount = layoutManager.getChildCount();
|
||||||
totalItemCount = layoutManager.getItemCount();
|
final int totalItemCount = layoutManager.getItemCount();
|
||||||
|
|
||||||
// Already covers the GridLayoutManager case
|
// Already covers the GridLayoutManager case
|
||||||
if (layoutManager instanceof LinearLayoutManager) {
|
if (layoutManager instanceof LinearLayoutManager) {
|
||||||
|
Reference in New Issue
Block a user