Initialize v1 support

This commit is contained in:
Kirill Kamakin
2022-08-07 17:19:35 +02:00
parent 684b492fb2
commit 95205f8ffe
24 changed files with 478 additions and 26 deletions

View File

@@ -44,7 +44,7 @@ class RecipeModelLoader private constructor(
options: Options?
): String? {
logger.v { "getUrl() called with: model = $model, width = $width, height = $height, options = $options" }
return runBlocking { recipeImageUrlProvider.generateImageUrl(model?.slug) }
return runBlocking { recipeImageUrlProvider.generateImageUrl(model?.remoteId) }
}
override fun getHeaders(

View File

@@ -20,7 +20,7 @@ class RecipeInfoViewModel @Inject constructor(
private val _uiState = MutableLiveData(RecipeInfoUiState())
val uiState: LiveData<RecipeInfoUiState> get() = _uiState
fun loadRecipeInfo(recipeId: Long, recipeSlug: String) {
fun loadRecipeInfo(recipeId: String, recipeSlug: String) {
logger.v { "loadRecipeInfo() called with: recipeId = $recipeId, recipeSlug = $recipeSlug" }
_uiState.value = RecipeInfoUiState()
viewModelScope.launch {