private void SendMessagePrivateChatImageView_Click(object sender, EventArgs e)
 {
     if (typeMessagePrivateChatEditText.Text != "")
     {
         send = new SendMessageManageListener(Helpers.Helper.GetUserId(),
                                              conversation.UserId, typeMessagePrivateChatEditText.Text,
                                              conversation.ProfileName,
                                              conversation.ProfileImageUrl);;
         typeMessagePrivateChatEditText.Text = "";
         chatBodyPrivateChatRecyclerView.ScrollToPosition(chatBodyPrivateChatRecyclerView.GetAdapter().ItemCount - 1);
         send.SendMessage();
     }
 }
Exemple #2
0
 private void SendMessageManageFragment_OnMessageSent(object sender, SendMessageManageFragment.MessageArgs e)
 {
     sendMessageManageListener = new SendMessageManageListener(FirebaseBackend.FirebaseBackend.GetFireAuth().CurrentUser.Uid.ToString(),
                                                               e.UserArgs.User_Id,
                                                               e.BMessage.MessageBody,
                                                               e.UserArgs.Fullname,
                                                               e.UserArgs.Image_Url);
     sendMessageManageListener.OnSendingResult += (s, args) =>
     {
         Toast.MakeText(this, args.Result, ToastLength.Long).Show();
     };
     sendMessageManageListener.SendMessage();
     sendMessageManageFragment.Dismiss();
 }
 private void SendCreateMessageButton_Click(object sender, EventArgs e)
 {
     if (messageBodyCreateMessageEditText.Text != "")
     {
         sendMessageManageListener = new SendMessageManageListener(FirebaseBackend.FirebaseBackend.GetFireAuth().CurrentUser.Uid.ToString(),
                                                                   thisUser.User_Id,
                                                                   messageBodyCreateMessageEditText.Text,
                                                                   thisUser.Fullname,
                                                                   thisUser.Image_Url);
         sendMessageManageListener.OnSendingResult += (s, args) =>
         {
             Toast.MakeText(Application.Context, args.Result, ToastLength.Long).Show();
         };
         sendMessageManageListener.SendMessage();
         this.Dismiss();
     }
     else
     {
         Toast.MakeText(this.Context, "Please enter a message", ToastLength.Long).Show();
     }
 }