From a6b316160c1f35a2f74ed8d7a9b932fe780f6199 Mon Sep 17 00:00:00 2001 From: VaiTon Date: Wed, 25 Aug 2021 17:11:56 +0200 Subject: [PATCH] fix: replaced launch with launchWhenResumed in SummaryProductFragment Should fix some errors with fragment not being attached. --- .../features/product/view/summary/SummaryProductFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/product/view/summary/SummaryProductFragment.kt b/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/product/view/summary/SummaryProductFragment.kt index a317d4249351..f70c571663b6 100644 --- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/product/view/summary/SummaryProductFragment.kt +++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/features/product/view/summary/SummaryProductFragment.kt @@ -301,7 +301,7 @@ class SummaryProductFragment : BaseFragment(), ISummaryProductPresenter.View { // Checks the product states_tags to determine which prompt to be shown refreshStatesTagsPrompt() - lifecycleScope.launch { + lifecycleScope.launchWhenResumed { presenter.loadAllergens() presenter.loadCategories() presenter.loadLabels()