Skip to content

Commit

Permalink
refactor: println removed
Browse files Browse the repository at this point in the history
  • Loading branch information
axellaffite committed Sep 25, 2020
1 parent 532784d commit 4f08359
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,20 @@ class ImageViewPager<Image>(var images: List<Image>, private val converter: (Ima

return ImageViewHolder(view, object: Target {
override fun onBitmapLoaded(bitmap: Bitmap?, from: Picasso.LoadedFrom?) {
println("Loaded")
bitmap?.let {
val res = onImageLoadListener?.onSuccess(bitmap) ?: bitmap
view.setImage(ImageSource.bitmap(res))
}
}

override fun onBitmapFailed(e: Exception?, errorDrawable: Drawable?) {
println("failed")
e?.printStackTrace(System.err)
onImageLoadListener?.onError()?.let {
view.setImage(ImageSource.bitmap(it))
}
}

override fun onPrepareLoad(placeHolderDrawable: Drawable?) {
println("prepare")
onImageLoadListener?.onPrepare()?.let {
view.setImage(ImageSource.bitmap(it))
}
Expand Down

0 comments on commit 4f08359

Please sign in to comment.