Add linked ingredients to recipe step (#177)
* Add Compose to app module * Move Theme to ui module * Add Coil image loader * Use Compose for recipe screen * Save instruction to ingredient relation to DB * Display ingredients as server formats them * Display linked ingredients under each step * Fix ingredients padding * Show recipe full screen * Fix recipe screen UI issues * Hide keyboard on recipe navigation * Fix loading recipes from DB with no instructions or ingredients * Add instructions section title * Add ingredients section title * Remove unused view holders
This commit is contained in:
@@ -8,8 +8,8 @@ data class GetRecipeResponse(
|
||||
@SerialName("id") val remoteId: String,
|
||||
@SerialName("name") val name: String,
|
||||
@SerialName("recipeYield") val recipeYield: String = "",
|
||||
@SerialName("recipeIngredient") val recipeIngredients: List<GetRecipeIngredientResponse> = emptyList(),
|
||||
@SerialName("recipeInstructions") val recipeInstructions: List<GetRecipeInstructionResponse> = emptyList(),
|
||||
@SerialName("recipeIngredient") val ingredients: List<GetRecipeIngredientResponse> = emptyList(),
|
||||
@SerialName("recipeInstructions") val instructions: List<GetRecipeInstructionResponse> = emptyList(),
|
||||
@SerialName("settings") val settings: GetRecipeSettingsResponse? = null,
|
||||
)
|
||||
|
||||
@@ -24,10 +24,20 @@ data class GetRecipeIngredientResponse(
|
||||
@SerialName("unit") val unit: GetUnitResponse?,
|
||||
@SerialName("food") val food: GetFoodResponse?,
|
||||
@SerialName("quantity") val quantity: Double?,
|
||||
@SerialName("display") val display: String,
|
||||
@SerialName("referenceId") val referenceId: String,
|
||||
@SerialName("title") val title: String?,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class GetRecipeInstructionResponse(
|
||||
@SerialName("id") val id: String,
|
||||
@SerialName("title") val title: String = "",
|
||||
@SerialName("text") val text: String,
|
||||
@SerialName("ingredientReferences") val ingredientReferences: List<GetRecipeInstructionIngredientReference> = emptyList(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class GetRecipeInstructionIngredientReference(
|
||||
@SerialName("referenceId") val referenceId: String,
|
||||
)
|
||||
Reference in New Issue
Block a user