improve dependency injection (#723)

This commit is contained in:
Konrad Pozniak 2018-07-23 21:59:10 +02:00 committed by GitHub
commit 7f648b1acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 27 deletions

View file

@ -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)
}
}