Media actions: add more tests

This commit is contained in:
ganfra 2023-06-06 22:08:57 +02:00
parent 438fc6bb99
commit c0def1c3dc
9 changed files with 130 additions and 57 deletions

View file

@ -26,7 +26,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.res.stringResource
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.update
@ -60,7 +59,7 @@ fun handleSnackbarMessage(
val snackbarMessage by snackbarDispatcher.snackbarMessage.collectAsState(initial = null)
LaunchedEffect(snackbarMessage) {
if (snackbarMessage != null) {
launch(Dispatchers.Main) {
launch {
snackbarDispatcher.clear()
}
}