Skip to content

Commit

Permalink
NTV-395: UI – Out of place image captions (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang committed Feb 15, 2022
1 parent 2a47258 commit cf96299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -10,7 +10,6 @@ import com.kickstarter.ui.views.OnImageWithCaptionClickedListener
class ImageElementViewHolder(
val binding: ViewElementImageFromHtmlBinding
) : KSViewHolder(binding.root) {
// TODO: attach ViewModel if necessary
private val imageView = binding.imageView

private fun configure(element: ImageViewElement) {
Expand All @@ -33,7 +32,9 @@ class ImageElementViewHolder(

override fun bindData(data: Any?) {
(data as? ImageViewElement).apply {
this?.let { configure(it) }
this?.let {
configure(it)
}
}
}
}
Expand Up @@ -60,7 +60,7 @@ class ImageWithCaptionView @JvmOverloads constructor(
isUnderlineText = true
)
}
}
} else binding.imageCaptionTextView.isVisible = false
}

fun setLinkOnImage(href: String?) {
Expand Down

0 comments on commit cf96299

Please sign in to comment.