compose-intro-showcase icon indicating copy to clipboard operation
compose-intro-showcase copied to clipboard

Repeats on each recomposition

Open MHKalantarian opened this issue 1 year ago • 2 comments

It repeats showing Showcase on each recomposition even though the view that has its modifier does not get recomposed It also triggers twice anytime you enter a screen with compose navigation and without any recomposition


@Composable
internal fun ProfileScreen(
    modifier: Modifier = Modifier
) {
    var showAppIntro by remember {
        mutableStateOf(true)
    }

    IntroShowcase(
        showIntroShowCase = showAppIntro,
        onShowCaseCompleted = { showAppIntro = false },
        dismissOnClickOutside = true,
    ) {
        Scaffold(
            modifier = modifier,
            containerColor = MaterialTheme.colorScheme.tertiary,
            contentColor = MaterialTheme.colorScheme.onTertiary
        ) { insets ->
            Text(
                modifier = Modifier
                    .padding(insets)
                    .introShowCaseTarget(
                        index = 0,
                        content = {
                            Text(text = "test")
                        }
                    ),
                text = "Target view"
            )
        }
    }
}

MHKalantarian avatar Jul 07 '24 16:07 MHKalantarian

I have the same issue. @MHKalantarian Have you found a way to solve it on your side?

dmitriy-chernysh avatar Feb 12 '25 21:02 dmitriy-chernysh

Any solution for this issue ?

Heitem avatar May 23 '25 22:05 Heitem