You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Views/MyListPage.xaml.cs

24 lines
693 B

using Endpoint;
using Models;
using ShoopNCook.Views;
namespace ShoopNCook.Pages;
public partial class MyListPage : ContentPage
{
public MyListPage(Account account, IRecipesService service)
{
InitializeComponent();
service.LookupWeeklyListOf(account).ForEach(info =>
{
RecipesLayout.Children.Add(new StoredRecipeView(info.Item1, info.Item2, amount =>
{
Recipe recipe = service.GetRecipe(info.Item1);
AccountRecipeRate rate = service.GetRateOf(account, recipe);
Shell.Current.Navigation.PushAsync(new RecipePage(recipe, rate, amount));
}));
});
}
}