diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/viewmodel/SharedScreenModel.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/viewmodel/SharedScreenModel.kt index 41a2b8d..0d5a2de 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/viewmodel/SharedScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/viewmodel/SharedScreenModel.kt @@ -5,6 +5,7 @@ import androidx.compose.runtime.setValue import cafe.adriel.voyager.core.model.ScreenModel import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow @@ -58,7 +59,7 @@ class SharedScreenModel() : ScreenModel { private val _searchTitle = MutableStateFlow("") val searchTitle: StateFlow = _searchTitle.asStateFlow() - @OptIn + @OptIn(ExperimentalCoroutinesApi::class) val filteredSongs: StateFlow> = searchTitle .mapLatest { currentTitle -> val searchTxt = if (currentTitle == "") "" else currentTitle.trim()