Why is my snackbar always calling Dismissed but ne...
# compose
a
Why is my snackbar always calling Dismissed but never ActionPerformed?
Copy code
scope.launch {
                        val snackbarResult = scaffoldState.snackbarHostState.showSnackbar(
                            "Grant permission to modify device audio",
                            actionLabel = "Settings"
                        )
                        when (snackbarResult) {
                            SnackbarResult.Dismissed -> Log.d("SnackbarDemo", "Dismissed")
                            SnackbarResult.ActionPerformed -> Log.d("SnackbarDemo", "Snackbar's button clicked")
                        }
                    }
I want to launch an Intent on the “Settings” label click but it calls Dismissed when I click the label of the SnackBar. What am I doing wrong? When is it calling ActionPerformed?