diff --git a/app/src/main/java/zechs/drive/stream/di/ApiModule.kt b/app/src/main/java/zechs/drive/stream/di/ApiModule.kt index 4a32b37..a0be256 100644 --- a/app/src/main/java/zechs/drive/stream/di/ApiModule.kt +++ b/app/src/main/java/zechs/drive/stream/di/ApiModule.kt @@ -1,21 +1,17 @@ package zechs.drive.stream.di -import android.content.Context -import com.google.gson.Gson import com.squareup.moshi.Moshi import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import dagger.Lazy import dagger.Module import dagger.Provides import dagger.hilt.InstallIn -import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Retrofit import retrofit2.converter.moshi.MoshiConverterFactory import zechs.drive.stream.BuildConfig -import zechs.drive.stream.data.local.AccountsDao import zechs.drive.stream.data.model.StarredAdapter import zechs.drive.stream.data.remote.DriveApi import zechs.drive.stream.data.remote.GithubApi @@ -23,7 +19,6 @@ import zechs.drive.stream.data.remote.TokenApi import zechs.drive.stream.data.repository.DriveRepository import zechs.drive.stream.data.repository.GithubRepository import zechs.drive.stream.data.repository.TokenAuthenticator -import zechs.drive.stream.utils.FirstRunProfileMigrator import zechs.drive.stream.utils.SessionManager import zechs.drive.stream.utils.util.Constants.Companion.GITHUB_API import zechs.drive.stream.utils.util.Constants.Companion.GOOGLE_ACCOUNTS_URL @@ -156,15 +151,4 @@ object ApiModule { return GithubRepository(githubApi) } - @Provides - @Singleton - fun provideFirstRunProfileMigrator( - @ApplicationContext appContext: Context, - gson: Gson, - sessionManager: SessionManager, - accountsManager: AccountsDao, - ): FirstRunProfileMigrator { - return FirstRunProfileMigrator(appContext, gson, sessionManager, accountsManager) - } - } \ No newline at end of file diff --git a/app/src/main/java/zechs/drive/stream/di/AppModule.kt b/app/src/main/java/zechs/drive/stream/di/AppModule.kt index 78f8af5..0abd7ac 100755 --- a/app/src/main/java/zechs/drive/stream/di/AppModule.kt +++ b/app/src/main/java/zechs/drive/stream/di/AppModule.kt @@ -9,6 +9,7 @@ import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent import zechs.drive.stream.data.local.AccountsDao import zechs.drive.stream.utils.AppSettings +import zechs.drive.stream.utils.FirstRunProfileMigrator import zechs.drive.stream.utils.SessionManager import javax.inject.Singleton @@ -37,4 +38,15 @@ object AppModule { @ApplicationContext appContext: Context ): AppSettings = AppSettings(appContext) + @Provides + @Singleton + fun provideFirstRunProfileMigrator( + @ApplicationContext appContext: Context, + gson: Gson, + sessionManager: SessionManager, + accountsManager: AccountsDao, + ): FirstRunProfileMigrator { + return FirstRunProfileMigrator(appContext, gson, sessionManager, accountsManager) + } + } \ No newline at end of file