Updated on 2026-08-14

This commit is contained in:
Tangem 2026-03-12 17:55:33 +03:00
parent bc8bb4da19
commit 07f94d3a95
86 changed files with 317 additions and 387 deletions

View file

@ -0,0 +1,5 @@
package com.tangem.utils.coroutines
import kotlinx.coroutines.CoroutineScope
interface AppCoroutineScope : CoroutineScope

View file

@ -1,7 +0,0 @@
package com.tangem.utils.coroutines
import javax.inject.Qualifier
@Qualifier
@Retention(AnnotationRetention.BINARY)
annotation class DelayedWork

View file

@ -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)
}
}