Created
January 11, 2020 23:59
-
-
Save RBusarow/2e79e15bb27347b8de811a91b5f4717e 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
@Qualifier | |
annotation class MainCoroutineScope | |
@Module | |
object CoroutineScopeModule { | |
@Provides | |
@MainCoroutineScope | |
fun provideMainCoroutineScope(): CoroutineScope = CoroutineScope(Job() + Dispatchers.Main) | |
} | |
class ProgressIndicator @Inject constructor( | |
@MainCoroutineScope | |
private val coroutineScope: CoroutineScope | |
) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment