Refactor(Context): Provide context using @ApplicationContext
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user