Skip to content

Commit

Permalink
Merge pull request #137 from Omega-R/feature/hotfix
Browse files Browse the repository at this point in the history
Sticky header call getStickyId with id = -1 bug fixed
  • Loading branch information
anton-knyazev authored Aug 23, 2019
2 parents 4f62871 + 3e92ae4 commit 433b21b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private long calculateStickerIdAndDrawIt(Canvas canvas, RecyclerView parent, boo
View stickerView = stickyHolder.itemView;
int top = getStickerTop(isReverseLayout, childView, stickerView, layoutPos + 1);

long previousStickyId = mStickyAdapter.getStickyId(adapterPosition - 1);
long previousStickyId = adapterPosition == 0 ? currentStickerId : mStickyAdapter.getStickyId(adapterPosition - 1);

if (layoutPos == 0 && top > 0 && adapterPosition > 0
&& hasSticker(adapterPosition - 1)
Expand Down

0 comments on commit 433b21b

Please sign in to comment.