Last active
April 18, 2021 20:07
-
-
Save Skyyo/9f52a7a5661fbcd7a1437dfb2b4e95d2 to your computer and use it in GitHub Desktop.
This file contains 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
fun onCardActive(currencyId: Int, index: Int) { | |
if (producers.containsKey(currencyId)) return | |
val currencyPriceUpdateFlow: Flow<Int> = provideCurrencyUpdateFlow() | |
val currencyPriceUpdateJob = viewModelScope.launch { | |
observePriceUpdateFlow(index, currencyPriceUpdateFlow) | |
} | |
producers[currencyId] = currencyPriceUpdateJob | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment