Skip to content

Commit

Permalink
fixed issue Avoid reassigning parameters such as 'itemPosition'
Browse files Browse the repository at this point in the history
Signed-off-by: alex <alex.plutta@googlemail.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
  • Loading branch information
AlexNi245 authored and AndyScherzinger committed Aug 20, 2019
1 parent 5a3db5e commit fa11565
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,14 @@ CharSequence getHeaderDateString(Context context, long modificationTimestamp) {

@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;
}


Expand Down

0 comments on commit fa11565

Please sign in to comment.