void HandlePopUpAlertAboutEmotionTriggered(object sender, AlertMessageEventArgs e) { Device.BeginInvokeOnMainThread(async() => { var userResponseToAlert = await DisplayAlert(e.Title, e.Message, "OK", "Cancel"); ViewModel.EmotionPopUpAlertResponseCommand?.Execute(new EmotionPopupResponseModel(userResponseToAlert, e.Player)); }); }
void HandleDisplayEmotionBeforeCameraAlert(object sender, AlertMessageEventArgs e) { var alertMessage = e.Message; bool userResponseToAlert = false; Device.BeginInvokeOnMainThread(async() => { userResponseToAlert = await DisplayAlert(alertMessage.Title, alertMessage.Message, "OK", "Cancel"); _viewModel.UserResponseToAlert = userResponseToAlert; _viewModel.HasUserAcknowledgedPopUp = true; }); }