Created
February 28, 2021 13:25
-
-
Save raulh82vlc/dc7971db19ab9ddae462aa4128f22722 to your computer and use it in GitHub Desktop.
SearchStateHandler StateFlow collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ActivityScope | |
class SearchStateHandler @Inject constructor( | |
@Named("CoroutineUIScope") private val scope: CoroutineScope | |
) { | |
private lateinit var stateFlow: StateFlow<TweetsUIState> | |
fun processStateCollection() { | |
stateFlow.onEach { uiState -> | |
tweetsListUI?.handleStates(uiState) | |
}.launchIn(scope) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment