Inheritance: ContactID
Ejemplo n.º 1
0
 public virtual bool Equals(ChatID other)
 {
     if (object.ReferenceEquals(other, null))
     {
         return false;
     }
     if (object.ReferenceEquals(other, this))
     {
         return true;
     }
     if (!string.IsNullOrEmpty( this.DialogID) && !string.IsNullOrEmpty( other.DialogID))
     {
         return (this.DialogID == other.DialogID);
     }
     return (string.IsNullOrEmpty(this.DialogID) && string.IsNullOrEmpty(other.DialogID) && base.Equals((ContactID)other));
 }
Ejemplo n.º 2
0
        public virtual bool Equals(ChatID other)
        {
            if (object.ReferenceEquals(other, null))
            {
                return(false);
            }
            if (object.ReferenceEquals(other, this))
            {
                return(true);
            }

            if (this.IsRttChat != other.IsRttChat)
            {
                return(false);
            }

            return(base.Equals((ContactID)other));
        }
Ejemplo n.º 3
0
        public virtual bool Equals(ChatID other)
        {
            if (object.ReferenceEquals(other, null))
            {
                return false;
            }
            if (object.ReferenceEquals(other, this))
            {
                return true;
            }

            if (this.IsRttChat != other.IsRttChat)
            {
                return false;
            }

            return base.Equals((ContactID)other);
        }
Ejemplo n.º 4
0
 public void MarkChatAsRead(ChatID chatId)
 {
     VATRPChat chat = FindChat(chatId);
     if (chat != null)
     {
         chat.UnreadMsgCount = 0;
         OnConversationUnReadStateChanged(chat);
         if ( chat.Contact != null )
         {
             chat.Contact.UnreadMsgCount = 0;
         }
         _linphoneSvc.MarkChatAsRead(chat.NativePtr);
     }
 }
Ejemplo n.º 5
0
        public VATRPChat FindChat(ChatID chatID)
        {
            if (chatID == null)
                return null;

            lock (this._chatItems)
            {
                foreach (VATRPChat chatItem in this._chatItems)
                {
                    if ((chatItem != null) && chatItem == chatID)
                    {
                        return chatItem;
                    }
                }
            }

            return null;
        }
Ejemplo n.º 6
0
 public void ClearChatMsgs(ChatID chatID)
 {
     if (chatID != null)
     {
         VATRPChat chat = this.FindChat(chatID);
         if (chat != null)
         {
             chat.Messages.Clear();
         }
     }
 }
Ejemplo n.º 7
0
 public ChatID(ChatID chatID)
     : base(chatID.ID, chatID.NativePtr)
 {
     this.DialogID = chatID.DialogID;
 }
Ejemplo n.º 8
0
 public ChatID(ChatID chatID) : base(chatID.ID, chatID.NativePtr)
 {
     this.DialogID = chatID.DialogID;
 }