|
|
@ -33,15 +33,17 @@ import dagger.hilt.android.qualifiers.ApplicationContext
|
|
|
|
import dagger.hilt.components.SingletonComponent
|
|
|
|
import dagger.hilt.components.SingletonComponent
|
|
|
|
import kotlinx.coroutines.CoroutineDispatcher
|
|
|
|
import kotlinx.coroutines.CoroutineDispatcher
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.VisibleForTesting
|
|
|
|
import javax.inject.Singleton
|
|
|
|
import javax.inject.Singleton
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@VisibleForTesting
|
|
|
|
@Module
|
|
|
|
@Module
|
|
|
|
@InstallIn(SingletonComponent::class)
|
|
|
|
@InstallIn(SingletonComponent::class)
|
|
|
|
object DataStoreModule {
|
|
|
|
object DataStoreModule {
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
@Singleton
|
|
|
|
@Singleton
|
|
|
|
internal fun providesUserPreferencesDataStore(
|
|
|
|
fun providesUserPreferencesDataStore(
|
|
|
|
@ApplicationContext context: Context,
|
|
|
|
@ApplicationContext context: Context,
|
|
|
|
@Dispatcher(IO) ioDispatcher: CoroutineDispatcher,
|
|
|
|
@Dispatcher(IO) ioDispatcher: CoroutineDispatcher,
|
|
|
|
@ApplicationScope scope: CoroutineScope,
|
|
|
|
@ApplicationScope scope: CoroutineScope,
|
|
|
|