From c5b52711d08cd4823cf3639b4b8a2f355d364efa Mon Sep 17 00:00:00 2001 From: sathwikcs <85106054+sathwikcs@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:41:47 +0530 Subject: [PATCH] AppModule --- .../attendanceapp/di/AppModule.kt | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/app/src/main/java/in/sminnovations/attendanceapp/di/AppModule.kt b/app/src/main/java/in/sminnovations/attendanceapp/di/AppModule.kt index c55c5b8..44eb575 100644 --- a/app/src/main/java/in/sminnovations/attendanceapp/di/AppModule.kt +++ b/app/src/main/java/in/sminnovations/attendanceapp/di/AppModule.kt @@ -1,57 +1,29 @@ package `in`.sminnovations.attendanceapp.di import android.content.Context -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.preferencesDataStore import com.google.firebase.firestore.FirebaseFirestore import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent -import `in`.sminnovations.attendanceapp.screens.home.data.CheckInCheckOutDataStore -import `in`.sminnovations.attendanceapp.screens.login.data.LoginDataStore import javax.inject.Singleton @Module @InstallIn(SingletonComponent::class) object AppModule { - private val Context.dataStore by preferencesDataStore(name = "employee_data") - - @Provides @Singleton fun provideAppContext(@ApplicationContext context: Context): Context { return context } - @Provides - @Singleton - fun provideLoginDataStore(@ApplicationContext context: Context): LoginDataStore { - return LoginDataStore(context) - } - @Provides - @Singleton - fun provideCheckInCheckOutDataStore(@ApplicationContext context: Context): CheckInCheckOutDataStore { - return CheckInCheckOutDataStore(context) - } @Provides @Singleton fun provideFirebase(): FirebaseFirestore { return FirebaseFirestore.getInstance() } - @Provides - @Singleton - fun provideEmployeeDataStore(@ApplicationContext context: Context): DataStore { - return context.dataStore - } - -// fun provideFirebase(): FirebaseFirestore { -// return FirebaseFirestore.getInstance() -// } - }