/// <summary> /// Method to search for more recipes asynchronously /// </summary> private async void SearchForMoreRecipesAsync() { // Show refreshing symbol RecipeListView.IsRefreshing = true; // Get the data var result = await App.MasterController.EdamamApiHelper.QueryAsync(RecipeFilterText.Trim(), edamamResponse.From + 10, edamamResponse.To + 10); edamamResponse = result; // Populate the list view RecipeListView.IsRefreshing = false; result.Hits.ForEach(hit => Recipes.Add(hit.Recipe)); }
/// <summary> /// Method to search for recipes asynchronously /// </summary> private async void SearchForRecipeAsync() { // Clear the list view and display refreshing symbol Recipes.Clear(); RecipeListView.IsRefreshing = true; // Get the data var result = await App.MasterController.EdamamApiHelper.QueryAsync(RecipeFilterText.Trim()); edamamResponse = result; // Populate the list view RecipeListView.IsRefreshing = false; result.Hits.ForEach(hit => Recipes.Add(hit.Recipe)); }