From b9d8a03c9159ee031705f927a62db8b8b031d267 Mon Sep 17 00:00:00 2001 From: Giannis Stamatopoulos Date: Tue, 30 Jul 2024 01:07:28 +0300 Subject: [PATCH] Fix: Show BottomSheet with Successfully Issued Deferred Documents only if it is not already showing. --- .../ec/dashboardfeature/ui/dashboard/DashboardViewModel.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard-feature/src/main/java/eu/europa/ec/dashboardfeature/ui/dashboard/DashboardViewModel.kt b/dashboard-feature/src/main/java/eu/europa/ec/dashboardfeature/ui/dashboard/DashboardViewModel.kt index 428f0511..f17820fc 100644 --- a/dashboard-feature/src/main/java/eu/europa/ec/dashboardfeature/ui/dashboard/DashboardViewModel.kt +++ b/dashboard-feature/src/main/java/eu/europa/ec/dashboardfeature/ui/dashboard/DashboardViewModel.kt @@ -444,7 +444,10 @@ class DashboardViewModel( is DashboardInteractorRetryIssuingDeferredDocumentsPartialState.Result -> { val successDocs = response.successfullyIssuedDeferredDocuments - if (successDocs.isNotEmpty()) { + if (successDocs.isNotEmpty() + && !viewState.value.isBottomSheetOpen + && viewState.value.sheetContent is DashboardBottomSheetContent.DeferredDocumentsReady + ) { showBottomSheet( sheetContent = DashboardBottomSheetContent.DeferredDocumentsReady( successfullyIssuedDeferredDocuments = successDocs,