File tree 3 files changed +4
-4
lines changed
app/src/main/java/com/arctouch/codechallenge
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import android.app.Application
4
4
import com.arctouch.codechallenge.api.TmdbApi
5
5
import com.arctouch.codechallenge.data.Cache
6
6
import com.arctouch.codechallenge.di.apiModule
7
+ import com.arctouch.codechallenge.di.repositoryModule
7
8
import com.arctouch.codechallenge.di.viewModelModule
8
9
import io.reactivex.android.schedulers.AndroidSchedulers
9
10
import io.reactivex.schedulers.Schedulers
@@ -26,7 +27,7 @@ class App : Application() {
26
27
startKoin {
27
28
androidLogger()
28
29
androidContext(this @App)
29
- modules(listOf (apiModule, viewModelModule))
30
+ modules(listOf (apiModule, repositoryModule, viewModelModule))
30
31
}
31
32
api = createWebService()
32
33
getGenres()
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import retrofit2.converter.moshi.MoshiConverterFactory
9
9
10
10
val apiModule = module {
11
11
single { createWebService() }
12
- single<TmbRepository > { TmbRepositoryImpl (get()) }
13
12
}
14
13
15
14
fun createWebService (): TmdbApi {
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ package com.arctouch.codechallenge.di
2
2
3
3
import org.koin.dsl.module
4
4
5
- val repositoryViewModel = module {
6
- single { TmbRepositoryImpl (get()) }
5
+ val repositoryModule = module {
6
+ single< TmbRepository > { TmbRepositoryImpl (get()) }
7
7
}
You can’t perform that action at this time.
0 commit comments