private async void OpenEditDayMealDialogAsync(DayMeal meal) { var mealClone = meal.Clone(); var dialog = _dialogs.For <DayMealDialogViewModel>(DialogsIdentifier); dialog.Data.DialogTitle = "Modified meal"; dialog.Data.SubmitButtonTitle = "Save"; dialog.Data.DayMeal = DayMealViewModel.FromModel(mealClone); var dialogResult = await dialog.Show(); if (dialogResult != DialogResult.Ok) { return; } mealClone = dialog.Data.DayMeal.ToModel(); EatingDay.Meals.Replace(meal, mealClone); }