Updated on 2026-08-14
This commit is contained in:
parent
bc8bb4da19
commit
07f94d3a95
86 changed files with 317 additions and 387 deletions
|
|
@ -0,0 +1,5 @@
|
|||
package com.tangem.utils.coroutines
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
interface AppCoroutineScope : CoroutineScope
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package com.tangem.utils.coroutines
|
||||
|
||||
import javax.inject.Qualifier
|
||||
|
||||
@Qualifier
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class DelayedWork
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
package com.tangem.utils.di
|
||||
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import com.tangem.utils.coroutines.DelayedWork
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object DelayedWorkCoroutineModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@DelayedWork
|
||||
fun provideDelayedWorkCoroutineScope(coroutineDispatcherProvider: CoroutineDispatcherProvider): CoroutineScope {
|
||||
return CoroutineScope(SupervisorJob() + coroutineDispatcherProvider.io)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue