Implement displaying ingredient sections

This commit is contained in:
Kirill Kamakin
2022-12-04 19:25:36 +01:00
parent e2e76ea842
commit a18984bda0
8 changed files with 61 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ fun RecipeIngredientInfo.toRecipeIngredientEntity(remoteId: String) = RecipeIngr
unit = unit,
food = food,
quantity = quantity,
title = title,
)
fun RecipeInstructionInfo.toRecipeInstructionEntity(remoteId: String) = RecipeInstructionEntity(
@@ -129,6 +130,7 @@ fun GetRecipeIngredientResponseV0.toRecipeIngredientInfo() = RecipeIngredientInf
unit = null,
food = null,
quantity = 1.0,
title = null,
)
fun GetRecipeInstructionResponseV0.toRecipeInstructionInfo() = RecipeInstructionInfo(
@@ -153,6 +155,7 @@ fun GetRecipeIngredientResponseV1.toRecipeIngredientInfo() = RecipeIngredientInf
unit = unit?.name,
food = food?.name,
quantity = quantity,
title = title,
)
fun GetRecipeInstructionResponseV1.toRecipeInstructionInfo() = RecipeInstructionInfo(