improve dependency injection (#723)
This commit is contained in:
parent
61f3f6c928
commit
7f648b1acd
5 changed files with 28 additions and 27 deletions
|
@ -74,5 +74,7 @@ class AppModule {
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun providesDatabase(app: TuskyApplication): AppDatabase = TuskyApplication.getDB()
|
||||
fun providesDatabase(app: TuskyApplication): AppDatabase {
|
||||
return app.serviceLocator.get(AppDatabase::class.java)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue