Skip to content

Commit

Permalink
Fixed crashing when viewing lists
Browse files Browse the repository at this point in the history
  • Loading branch information
coydb committed Feb 20, 2022
1 parent b81f596 commit 0f2e045
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previo

String ingName = snapshot.child("ingredientName").getValue(String.class);
String ingUnit = snapshot.child("units").getValue(String.class);
String ingQuantity = snapshot.child("quantity").getValue(Long.class).toString();
String ingQuantity = snapshot.child("quantity").getValue(String.class);
onHandIngredientsList.add(new Ingredient(ingName, ingUnit, ingQuantity));
populateOnHandIngredients();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previo
for(DataSnapshot ing : ingredients.getChildren()) {
String ingName = ing.child("ingredientName").getValue(String.class);
String ingUnit = ing.child("units").getValue(String.class);
String ingQuantity = ing.child("quantity").getValue(Long.class).toString();
String ingQuantity = ing.child("quantity").getValue(String.class);
ingredientsList.add(new Ingredient(ingName, ingUnit, ingQuantity));
}
Recipe added = new Recipe(name, description, ingredientsList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previo
for(DataSnapshot ing : ingredients.getChildren()) {
String ingName = ing.child("ingredientName").getValue(String.class);
String ingUnit = ing.child("units").getValue(String.class);
String ingQuantity = ing.child("quantity").getValue(Long.class).toString();
String ingQuantity = ing.child("quantity").getValue(String.class);
ingredientsList.add(new Ingredient(ingName, ingUnit, ingQuantity));
}
Recipe added = new Recipe(name, description, ingredientsList);
Expand Down

0 comments on commit 0f2e045

Please # to comment.