/// <summary> /// Handles the user clicking the "Ask to lunch" button. /// </summary> public async void AskToLunch() { var location = SelectedLocation.Name == "Custom" ? new Location { Name = CustomLocation } : SelectedLocation; var lunch = new Lunch(Name, App.User, SelectedFriends.Concat(new[] { App.User }), location, SelectedDate.Add(SelectedTime).LocalDateTime); await App.Api.PostAsync("Lunch", lunch); ShellViewModel.Current.Navigate(typeof(Lunches)); }