File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/src/main/java/com/hoc081098/paginationmviflow/ui/main Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class MainVM @Inject constructor(
5353
5454 suspend fun processIntent (intent : VI ) = _intentSF .emit(intent)
5555
56- private val toPartialStateChange : FlowTransformer <VI , PartialStateChange > =
56+ private val toPartialStateChanges : FlowTransformer <VI , PartialStateChange > =
5757 FlowTransformer { intents ->
5858 intents
5959 .shareIn(viewModelScope, SharingStarted .WhileSubscribed ())
@@ -75,7 +75,6 @@ class MainVM @Inject constructor(
7575 .pipe(mainProcessors.getRefreshProcessor(stateFlow))
7676 )
7777 }
78- .pipe(sendSingleEvent)
7978 }
8079
8180 private val sendSingleEvent: FlowTransformer <PartialStateChange , PartialStateChange > =
@@ -109,7 +108,8 @@ class MainVM @Inject constructor(
109108 init {
110109 _intentSF
111110 .pipe(intentFilterer)
112- .pipe(toPartialStateChange)
111+ .pipe(toPartialStateChanges)
112+ .pipe(sendSingleEvent)
113113 .scan(initialVS) { vs, change -> change.reduce(vs) }
114114 .onEach { _stateSF .value = it }
115115 .launchIn(viewModelScope)
You can’t perform that action at this time.
0 commit comments