Properly modify StateFlow value (#7059)
This commit is contained in:
@@ -53,14 +53,14 @@ class HistoryPresenter(
|
||||
_query.collectLatest { query ->
|
||||
getHistory.subscribe(query)
|
||||
.catch { exception ->
|
||||
_state.emit(HistoryState.Error(exception))
|
||||
_state.value = HistoryState.Error(exception)
|
||||
}
|
||||
.map { pagingData ->
|
||||
pagingData.toHistoryUiModels()
|
||||
}
|
||||
.cachedIn(presenterScope)
|
||||
.let { uiModelsPagingDataFlow ->
|
||||
_state.emit(HistoryState.Success(uiModelsPagingDataFlow))
|
||||
_state.value = HistoryState.Success(uiModelsPagingDataFlow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user