mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-06 08:40:19 +00:00
rename SpecialMutableStateFlow to MutableRedeliverStateFlow
This commit is contained in:
@@ -3,7 +3,7 @@ package dev.inmo.micro_utils.coroutines.compose
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.remember
|
||||
import dev.inmo.micro_utils.coroutines.SpecialMutableStateFlow
|
||||
import dev.inmo.micro_utils.coroutines.MutableRedeliverStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.debounce
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.compose.web.css.StyleSheet
|
||||
* to add `Style(stylesheet)` on every compose function call
|
||||
*/
|
||||
object StyleSheetsAggregator {
|
||||
private val _stylesFlow = SpecialMutableStateFlow<Set<CSSRulesHolder>>(emptySet())
|
||||
private val _stylesFlow = MutableRedeliverStateFlow<Set<CSSRulesHolder>>(emptySet())
|
||||
val stylesFlow: StateFlow<Set<CSSRulesHolder>> = _stylesFlow.asStateFlow()
|
||||
|
||||
@Composable
|
||||
|
@@ -2,7 +2,7 @@ import androidx.compose.material.Button
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.ui.test.*
|
||||
import dev.inmo.micro_utils.coroutines.SpecialMutableStateFlow
|
||||
import dev.inmo.micro_utils.coroutines.MutableRedeliverStateFlow
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import kotlin.test.Test
|
||||
|
||||
@@ -11,7 +11,7 @@ class FlowStateTests {
|
||||
@Test
|
||||
@TestOnly
|
||||
fun simpleTest() = runComposeUiTest {
|
||||
val flowState = SpecialMutableStateFlow(0)
|
||||
val flowState = MutableRedeliverStateFlow(0)
|
||||
setContent {
|
||||
Button({ flowState.value++ }) { Text("Click") }
|
||||
Text(flowState.collectAsState().value.toString())
|
||||
|
Reference in New Issue
Block a user