fixed issue Avoid reassigning parameters such as 'itemPosition'
Signed-off-by: alex <[email protected]> Signed-off-by: Andy Scherzinger <[email protected]>
This commit is contained in:
1 parent
5a3db5ef2b
commit
fa115658b3
1 file changed
+5
-4
@@ -429,13 +429,14 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||
|
||||
@Override
|
||||
public int getHeaderPositionForItem(int itemPosition) {
|
||||
while (itemPosition >= 0) {
|
||||
if (this.isHeader(itemPosition)) {
|
||||
int headerPosition = itemPosition;
|
||||
while (headerPosition >= 0) {
|
||||
if (this.isHeader(headerPosition)) {
|
||||
break;
|
||||
}
|
||||
itemPosition -= 1;
|
||||
headerPosition -= 1;
|
||||
}
|
||||
return itemPosition;
|
||||
return headerPosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user