File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
feature-add/src/main/java/com/hoc/flowmvi/ui/add Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import kotlinx.coroutines.flow.onEach
30
30
import kotlinx.coroutines.flow.onStart
31
31
import kotlinx.coroutines.flow.scan
32
32
import kotlinx.coroutines.flow.stateIn
33
+ import kotlinx.coroutines.flow.take
33
34
import timber.log.Timber
34
35
35
36
@ExperimentalCoroutinesApi
@@ -139,12 +140,15 @@ class AddVM(
139
140
val firstChanges = merge(
140
141
filterIsInstance<ViewIntent .EmailChangedFirstTime >()
141
142
.log(" Intent" )
143
+ .take(1 )
142
144
.mapTo(PartialStateChange .FirstChange .EmailChangedFirstTime ),
143
145
filterIsInstance<ViewIntent .FirstNameChangedFirstTime >()
144
146
.log(" Intent" )
147
+ .take(1 )
145
148
.mapTo(PartialStateChange .FirstChange .FirstNameChangedFirstTime ),
146
149
filterIsInstance<ViewIntent .LastNameChangedFirstTime >()
147
150
.log(" Intent" )
151
+ .take(1 )
148
152
.mapTo(PartialStateChange .FirstChange .LastNameChangedFirstTime )
149
153
)
150
154
You can’t perform that action at this time.
0 commit comments