From 074b975097ff263cc8324377e9fd4826dfe06e6f Mon Sep 17 00:00:00 2001 From: PavloNetrebchuk Date: Tue, 31 Oct 2023 12:29:38 +0200 Subject: [PATCH] Minor changes --- .../core/presentation/dialog/appreview/AppReviewUI.kt | 1 + .../dialog/appreview/ThankYouDialogFragment.kt | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewUI.kt b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewUI.kt index e33421c01..0b8c62511 100644 --- a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewUI.kt +++ b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewUI.kt @@ -265,6 +265,7 @@ fun DefaultDialogBox( Box( modifier = Modifier .fillMaxSize() + .padding(horizontal = 12.dp) .noRippleClickable { onDismissClock() }, diff --git a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/ThankYouDialogFragment.kt b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/ThankYouDialogFragment.kt index b09964a09..89fe98c1c 100644 --- a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/ThankYouDialogFragment.kt +++ b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/ThankYouDialogFragment.kt @@ -69,10 +69,12 @@ class ThankYouDialogFragment : BaseAppReviewDialogFragment() { val request = reviewManager.requestReviewFlow() request.addOnCompleteListener { task -> try { - val reviewInfo = task.result - val flow = reviewManager.launchReviewFlow(requireActivity(), reviewInfo) - flow.addOnCompleteListener { _ -> - onPositiveRate() + if (request.isSuccessful) { + val reviewInfo = task.result + val flow = reviewManager.launchReviewFlow(requireActivity(), reviewInfo) + flow.addOnCompleteListener { _ -> + onPositiveRate() + } dismiss() } } catch (e: ReviewException) {