From 0ba43e16340fb1b864361066b8d1d4004d30614c Mon Sep 17 00:00:00 2001 From: kmags1 <114533822+kmags1@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:33:41 -0800 Subject: [PATCH] reviewed changes --- app/src/main/java/cse/gradle/Controller.java | 3 ++- app/src/main/java/cse/gradle/RecipeGenerator.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/cse/gradle/Controller.java b/app/src/main/java/cse/gradle/Controller.java index 03bb9bd..5b749f6 100644 --- a/app/src/main/java/cse/gradle/Controller.java +++ b/app/src/main/java/cse/gradle/Controller.java @@ -201,8 +201,9 @@ void setListeners(UserLogin userPane, View appScenes) { }); } + // TODO: Replace this method with an API call to the HTTP server using Model void handleRegenerateButton(AppFramePopUp popUp, View appScenes, Recipe recipe, RecipeList rList){ - Recipe newRecipe = new RecipeGenerator().reGenerateRecipe(recipe); + Recipe newRecipe = new RecipeGenerator().regenerateRecipe(recipe); popUp.getNameField().setText(newRecipe.getName()); popUp.getCategoryField().setText(newRecipe.getCategory()); popUp.getIngredientsField().setText(newRecipe.getIngredients()); diff --git a/app/src/main/java/cse/gradle/RecipeGenerator.java b/app/src/main/java/cse/gradle/RecipeGenerator.java index 148db73..b08cf64 100644 --- a/app/src/main/java/cse/gradle/RecipeGenerator.java +++ b/app/src/main/java/cse/gradle/RecipeGenerator.java @@ -60,7 +60,7 @@ public Recipe generateNewRecipe() { return returnRecipe; } - public Recipe reGenerateRecipe(Recipe existingRecipe){ + public Recipe regenerateRecipe(Recipe existingRecipe){ String mealtypeString = existingRecipe.getCategory(); String ingredientsString = existingRecipe.getIngredients(); String titleString = "";