Lukasz Kalnik
01/31/2022, 11:02 PMapiConfigRepository
dependency I get the exception `mutation attempt of frozen ApiConfigurationRepositoryImpl@1edb608`:
class TVShowsSharedViewModelImpl(
dispatcher: CoroutineDispatcher = Dispatchers.Main
) : TVShowsSharedViewModel,
KoinComponent {
val coroutineScope = CoroutineScope(dispatcher)
val tmdbApi: TmdbApi by inject()
val apiConfigRepository: ApiConfigurationRepository by inject()
init {
coroutineScope.launch {
val apiConfig = tmdbApi.getConfiguration()
with(apiConfigRepository) {
imageBaseUrl = apiConfig.images.baseUrl
updateBackdropSizes(apiConfig.images.backdropSizes)
}
}
}
}
Luca
02/01/2022, 6:04 AMLukasz Kalnik
02/01/2022, 8:28 AM