Skip to content

Commit

Permalink
Corrected use of holder position.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbutcher committed Nov 24, 2015
1 parent 857c311 commit b969b50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/io/plaidapp/ui/FeedAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ && getDataItemCount() > 0) {
if (item instanceof Story) {
bindDesignerNewsStory((Story) getItem(position), (DesignerNewsStoryHolder) holder);
} else if (item instanceof Shot) {
bindDribbbleShotView((Shot) item, (DribbbleShotHolder) holder, position);
bindDribbbleShotView((Shot) item, (DribbbleShotHolder) holder);
} else if (item instanceof Post) {
bindProductHuntPostView((Post) item, (ProductHuntStoryHolder) holder);
}
Expand Down Expand Up @@ -278,8 +278,7 @@ public void onAnimationEnd(Animator animation) {
}

private void bindDribbbleShotView(final Shot shot,
final DribbbleShotHolder holder,
final int position) {
final DribbbleShotHolder holder) {
final BadgedFourThreeImageView iv = (BadgedFourThreeImageView) holder.itemView;
final int[] imageSize = shot.images.bestSize();
Glide.with(host)
Expand Down Expand Up @@ -330,7 +329,8 @@ public boolean onException(Exception e, String model, Target<GlideDrawable>
return false;
}
})
.placeholder(shotLoadingPlaceholders[position % shotLoadingPlaceholders.length])
.placeholder(shotLoadingPlaceholders[holder.getAdapterPosition() %
shotLoadingPlaceholders.length])
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.fitCenter()
.override(imageSize[0], imageSize[1])
Expand Down

0 comments on commit b969b50

Please sign in to comment.