private void ShowBlockProfileConfirmation(ProfilePreviewPageViewModel vm) { MainThread.BeginInvokeOnMainThread(async() => { var result = await DisplayAlert("Block profile", "Blocking this profile prevents you from ever seeing this pairing again. Are you sure you want to block this profile?", "Block", "Cancel"); await vm.BlockProfileCallback(result); MessagingCenter.Instance.Send(App.Current, MessageNames.ReloadSearch); App.CloseModal(); }); }
private void ShowReportProfileDialog(ProfilePreviewPageViewModel vm) { MainThread.BeginInvokeOnMainThread(async() => { var action = await DisplayActionSheet("Report", "Cancel", null, "Inappropriate profile", "Inappropriate photo", "Feels like spam", "Other"); var reason = action == "Inappropriate profile" ? ReportProfileReason.InappropriateProfile : action == "Inappropriate photo" ? ReportProfileReason.InappropriatePhotos : action == "Feels like spam" ? ReportProfileReason.Spam : ReportProfileReason.Other; await vm.ReportProfileCallback(reason); await DisplayAlert("Reported", "Thanks for help, the profile will be reviewed and the appropriate action taken.", "Ok"); }); }
public ProfilePreviewPage(CardItemViewModel cardItem) { InitializeComponent(); BindingContext = new ProfilePreviewPageViewModel(cardItem); On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); }