remove unnecessary TAG field and replace nested if statement with && to fix codeacy-bot issues

Signed-off-by: alex <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
This commit is contained in:
alex authored and Andy Scherzinger committed 2019-08-20 16:48:19 +02:00
1 parent a26a895047
commit 7a30070be9
1 file changed
+3 -6
@@ -12,7 +12,6 @@ import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class ActivityListItemDecoration extends RecyclerView.ItemDecoration {
private final String TAG = this.getClass().getSimpleName();
private final StickyHeaderAdapter adapter;
@@ -68,11 +67,9 @@ public class ActivityListItemDecoration extends RecyclerView.ItemDecoration {
View childInContact = null;
for (int i = 0; i < parent.getChildCount(); i++) {
View currentChild = parent.getChildAt(i);
if (currentChild.getBottom() > contactPoint) {
if (currentChild.getTop() <= contactPoint) {
childInContact = currentChild;
break;
}
if (currentChild.getBottom() > contactPoint && currentChild.getTop() <= contactPoint) {
childInContact = currentChild;
break;
}
}
return childInContact;