Skip to content

Commit

Permalink
fix: display additive name
Browse files Browse the repository at this point in the history
Fixes #4076
  • Loading branch information
VaiTon committed Jun 28, 2021
1 parent a10edcf commit 87c8c2f
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -221,8 +221,6 @@ class ProductCompareAdapter(
}

private fun loadAdditives(product: Product, view: TextView) {
if (product.additivesTags.isEmpty()) return

product.additivesTags.toObservable()
.flatMapSingle { tag ->
productRepository.getAdditiveByTagAndLanguageCode(tag, language)
Expand All @@ -240,9 +238,9 @@ class ProductCompareAdapter(
.subscribe { additives ->
if (additives.isNotEmpty()) {
view.text = SpannableStringBuilder()
.bold { append(activity.getString(R.string.compare_additives)) }
.append(" \n")
.append(additives.joinToString("\n"))
.bold { append(activity.getString(R.string.compare_additives)) }
.append("\n")
.append(additives.joinToString("\n") { it.name })
setMaxCardHeight()
}
}.addTo(disp)
Expand Down

0 comments on commit 87c8c2f

Please sign in to comment.