private void SdkWrapper_ThumbnailAvailable(object sender, Rainbow.Events.IdEventArgs e)
 {
     if (attachmentId == e.Id)
     {
         UpdateThumbnailDisplay();
     }
 }
 private void SdkWrapper_MessagesAllRead(object sender, Rainbow.Events.IdEventArgs e)
 {
     if (e.Id == conversationId)
     {
         receiptReceived = receipt = Rainbow.Model.ReceiptType.ClientRead.ToString();
         UpdateDisplay();
     }
 }
        private void AvatarPool_BubbleAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
        {
            ConversationLight conversation = GetConversationByPeerId(e.Id);

            if (conversation != null)
            {
                conversation.AvatarSource = Helper.GetConversationAvatarImageSource(conversation);
            }
        }
        private void FilePool_FileDescriptorAvailable(object sender, Rainbow.Events.IdEventArgs e)
        {
            String conversationId = filePool.GetConversationIdForFileDescriptorId(e.Id);

            if (conversationId == this.conversationId)
            {
                Model.Message message = GetMessageByFileDescriptorId(e.Id);
                if (message != null)
                {
                }
            }
        }
 private void AvatarPool_BubbleAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
 {
     if ((rbConversation != null) &&
         (rbConversation.Type == Rainbow.Model.Conversation.ConversationType.Room) &&
         (rbConversation.Id == e.Id))
     {
         if (Conversation != null)
         {
             Conversation.AvatarSource = Helper.GetConversationAvatarImageSource(Conversation);
         }
     }
 }
        private void FilePool_ThumbnailAvailable(object sender, Rainbow.Events.IdEventArgs e)
        {
            String conversationId = filePool.GetConversationIdForFileDescriptorId(e.Id);

            if (conversationId == this.conversationId)
            {
                Model.Message message = GetMessageByFileDescriptorId(e.Id);
                if (message != null)
                {
                    SetFileAttachmentSourceOfMessage(message, e.Id);
                }
            }
        }
        private void AvatarPool_ContactAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
        {
            ConversationLight conversation = GetConversationByPeerId(e.Id);

            if (conversation != null)
            {
                log.Debug("[AvatarPool_ContactAvatarChanged] - contactId:[{0}] - conversationId:[{1}]", e.Id, conversation.Id);
                conversation.AvatarSource = Helper.GetConversationAvatarImageSource(conversation);
            }
            else
            {
                log.Debug("[AvatarPool_ContactAvatarChanged] - Avatar contactId:[{0}] but no conversation found ...", e.Id);
            }
        }
 private void RbInstantMessaging_MessagesAllRead(object sender, Rainbow.Events.IdEventArgs e)
 {
     // Set to ClientRead all messages in the list
     if (e.Id == this.conversationId)
     {
         log.Debug("[RbInstantMessaging_MessagesAllRead] conversationId:[{0}]", conversationId);
         lock (lockObservableMessagesList)
         {
             foreach (Model.Message message in MessagesList)
             {
                 if (message.PeerJid == currentContactJid)
                 {
                     SetReceiptPartOfMessage(message, ReceiptType.ClientRead);
                 }
             }
         }
     }
 }
Exemplo n.º 9
0
 private void AvatarPool_ContactAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
 {
     if (System.Windows.Application.Current != null)
     {
         System.Windows.Application.Current.Dispatcher.Invoke(new Action(() =>
         {
             FavoriteViewModel result = GetFavoriteByPeerId(e.Id);
             if (result != null)
             {
                 log.LogDebug("[AvatarPool_ContactAvatarChanged] - contactId:[{0}] - favoriteId:[{1}]", e.Id, result.Id);
                 result.AvatarImageSource = Helper.GetContactAvatarImageSource(e.Id);
             }
             //else
             //{
             //    log.LogDebug("[AvatarPool_ContactAvatarChanged] - Avatar contactId:[{0}] but no conversation found ...", e.Id);
             //}
         }));
     }
 }
Exemplo n.º 10
0
 private void AvatarPool_BubbleAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
 {
     if (System.Windows.Application.Current != null)
     {
         System.Windows.Application.Current.Dispatcher.Invoke(new Action(() =>
         {
             ConversationLightViewModel conversation = GetConversationByPeerId(e.Id);
             if (conversation != null)
             {
                 log.LogDebug("[AvatarPool_BubbleAvatarChanged] - conversationId:[{0}]", conversation.Id);
                 conversation.AvatarImageSource = Helper.GetConversationAvatarImageSource(conversation);
             }
             else
             {
                 log.LogDebug("[AvatarPool_BubbleAvatarChanged] - no conversation found:[{0}]", e.Id);
             }
         }));
     }
 }
        private void AvatarPool_ContactAvatarChanged(object sender, Rainbow.Events.IdEventArgs e)
        {
            // Check Conversation Avatar
            if ((rbConversation != null) &&
                (rbConversation.Type == Rainbow.Model.Conversation.ConversationType.User) &&
                (rbConversation.Id == e.Id))
            {
                if (Conversation != null)
                {
                    Conversation.AvatarSource = Helper.GetConversationAvatarImageSource(Conversation);
                }
            }

            // Need to update this contact in each messages (just avatar part)
            Contact contact = XamarinApplication.RbContacts.GetContactFromContactId(e.Id);

            if (contact != null)
            {
                UpdateMessagesForJid(contact.Jid_im, true, false);
            }
        }
Exemplo n.º 12
0
 private void FilePool_FileDescriptorNotAvailable(object sender, Rainbow.Events.IdEventArgs e)
 {
     OnFileDescriptorNotAvailable(sender, e);
 }
Exemplo n.º 13
0
 private void FilePool_ThumbnailAvailable(object sender, Rainbow.Events.IdEventArgs e)
 {
     OnThumbnailAvailable(sender, e);
 }
Exemplo n.º 14
0
 private void RbInstantMessaging_MessagesAllRead(object sender, Rainbow.Events.IdEventArgs e)
 {
     OnMessagesAllRead(sender, e);
 }