Fix minor warning.
This commit is contained in:
parent
1ecb704e24
commit
1f15573fef
1 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ class SnackbarDispatcher {
|
|||
}
|
||||
|
||||
/** Used to provide a [SnackbarDispatcher] to composable functions, it's needed for [rememberSnackbarHostState]. */
|
||||
val LocalSnackbarDispatcher = compositionLocalOf<SnackbarDispatcher> { SnackbarDispatcher() }
|
||||
val LocalSnackbarDispatcher = compositionLocalOf { SnackbarDispatcher() }
|
||||
|
||||
@Composable
|
||||
fun SnackbarDispatcher.collectSnackbarMessageAsState(): State<SnackbarMessage?> {
|
||||
|
|
@ -75,7 +75,7 @@ fun rememberSnackbarHostState(snackbarMessage: SnackbarMessage?): SnackbarHostSt
|
|||
LaunchedEffect(snackbarMessage.id) {
|
||||
// If the message wasn't already displayed, do it now, and mark it as displayed
|
||||
// This will prevent the message from appearing in any other active SnackbarHosts
|
||||
if (snackbarMessage.isDisplayed.getAndSet(true) == false) {
|
||||
if (snackbarMessage.isDisplayed.getAndSet(true).not()) {
|
||||
try {
|
||||
snackbarHostState.showSnackbar(
|
||||
message = snackbarMessageText,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue