From 2f1d616b24af911ae597d14c17fec567970a58f6 Mon Sep 17 00:00:00 2001 From: Tahaak67 Date: Sat, 12 Jul 2025 20:57:01 +0200 Subject: [PATCH] Fix Target showcase disappear between indexes in subsequent mode --- .../ui/TargetShowcaseLayout.kt | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/showcase-layout-compose/src/commonMain/kotlin/ly/com/tahaben/showcase_layout_compose/ui/TargetShowcaseLayout.kt b/showcase-layout-compose/src/commonMain/kotlin/ly/com/tahaben/showcase_layout_compose/ui/TargetShowcaseLayout.kt index dc47eb2..57efaf2 100644 --- a/showcase-layout-compose/src/commonMain/kotlin/ly/com/tahaben/showcase_layout_compose/ui/TargetShowcaseLayout.kt +++ b/showcase-layout-compose/src/commonMain/kotlin/ly/com/tahaben/showcase_layout_compose/ui/TargetShowcaseLayout.kt @@ -402,28 +402,11 @@ fun TargetShowcaseLayout( } } else { - // When animateToNextTarget is true, we still want to fade out the outer circle - // before moving to the next target, but we remove it + // When animateToNextTarget is true, we don't want to fade out the outer circle + // we just handle message animation if any then move to the next target coroutineScope.launch { handleMessageExitAnimation(message, messageTextAlpha, animationDuration) - // Fade out the entire canvas to make the circle completely disappear - launch { - canvasAlpha.animateTo( - 0f, // Fade to 30% opacity instead of 0 for smoother transition - animationSpec = tween( - durationMillis = animationDuration / 3, - easing = FastOutSlowInEasing - ) - ) - } - - // Wait for animations to complete - delay((animationDuration / 3).toLong()) - - // Reset canvas alpha for the next target - canvasAlpha.snapTo(1f) - // Move to the next target currentIndex++ }