mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 12:35:30 +03:00
RepositoryModule: fix wrong injection for dateUtils
The module class is not supposed to have things injected into it. @Provides-annotated methods will have their parameters injected, instead. Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
349844391e
commit
8bc5735751
1 changed files with 1 additions and 5 deletions
|
@ -48,21 +48,17 @@ import com.nextcloud.talk.utils.database.user.CurrentUserProviderNew
|
|||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import okhttp3.OkHttpClient
|
||||
import javax.inject.Inject
|
||||
|
||||
@Module
|
||||
class RepositoryModule {
|
||||
|
||||
@Inject
|
||||
lateinit var dateUtils: DateUtils
|
||||
|
||||
@Provides
|
||||
fun provideConversationsRepository(ncApi: NcApi, userProvider: CurrentUserProviderNew): ConversationsRepository {
|
||||
return ConversationsRepositoryImpl(ncApi, userProvider)
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideSharedItemsRepository(ncApi: NcApi): SharedItemsRepository {
|
||||
fun provideSharedItemsRepository(ncApi: NcApi, dateUtils: DateUtils): SharedItemsRepository {
|
||||
return SharedItemsRepositoryImpl(ncApi, dateUtils)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue