Refactor(Context): Provide context using @ApplicationContext

This commit is contained in:
2024-08-08 10:30:23 +08:00
parent a3b1241fca
commit 640686296e
3 changed files with 4 additions and 17 deletions

View File

@@ -1,15 +0,0 @@
package top.fatweb.oxygen.toolbox.di
import android.app.Application
import android.content.Context
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
@Module
@InstallIn(SingletonComponent::class)
object AppModule {
@Provides
fun provideContext(app: Application): Context = app.applicationContext
}