Skip to content

Commit

Permalink
Hided NOVA in OBF Ingredients Tab (#3819)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrudultora committed Feb 8, 2021
1 parent 36b5671 commit 7b091e0
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -35,6 +35,7 @@ import com.afollestad.materialdialogs.MaterialDialog
import com.squareup.picasso.Picasso
import io.reactivex.rxkotlin.addTo
import openfoodfacts.github.scrachx.openfood.AppFlavors
import openfoodfacts.github.scrachx.openfood.AppFlavors.OBF
import openfoodfacts.github.scrachx.openfood.AppFlavors.isFlavors
import openfoodfacts.github.scrachx.openfood.R
import openfoodfacts.github.scrachx.openfood.customtabs.CustomTabActivityHelper
Expand Down Expand Up @@ -223,7 +224,7 @@ class IngredientsProductFragment : BaseFragment(), IIngredientsProductPresenter.
binding.cvTextTraceProduct.visibility = View.GONE
}
val novaGroups = product.novaGroups
if (novaGroups != null) {
if (novaGroups != null && !isFlavors(OBF)) {
binding.novaLayout.visibility = View.VISIBLE
binding.novaExplanation.text = Utils.getNovaGroupExplanation(novaGroups, requireContext()) ?: ""
binding.novaGroup.setImageResource(product.getNovaGroupResource())
Expand Down

0 comments on commit 7b091e0

Please sign in to comment.