From 36b56712adfc0d7cfe0159688dae76a5a29b6080 Mon Sep 17 00:00:00 2001 From: Mrudul Tora Date: Sat, 6 Feb 2021 16:29:00 +0530 Subject: [PATCH] Hided additive cards in OPF (#3797) * Hided additive cards in OPF * Fixed failed apk generation --- .../openfood/features/compare/ProductCompareAdapter.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/compare/ProductCompareAdapter.kt b/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/compare/ProductCompareAdapter.kt index 0270ff786925..dbdce02856a5 100644 --- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/compare/ProductCompareAdapter.kt +++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/compare/ProductCompareAdapter.kt @@ -41,6 +41,7 @@ import io.reactivex.rxkotlin.addTo import io.reactivex.rxkotlin.toObservable import io.reactivex.schedulers.Schedulers import openfoodfacts.github.scrachx.openfood.AppFlavors +import openfoodfacts.github.scrachx.openfood.AppFlavors.OPF import openfoodfacts.github.scrachx.openfood.AppFlavors.isFlavors import openfoodfacts.github.scrachx.openfood.R import openfoodfacts.github.scrachx.openfood.databinding.ProductComparisonListItemBinding @@ -94,6 +95,11 @@ class ProductCompareAdapter( holder.binding.productComparisonQuantity.visibility = View.VISIBLE holder.binding.productComparisonBrand.visibility = View.VISIBLE + // if the flavor is OpenProductsFacts hide the additives card + if (isFlavors(OPF)) { + holder.binding.productComparisonAdditive.visibility = View.GONE + } + // Modify the text on the button for adding products addProductButton?.setText(R.string.add_another_product)