Ejemplo n.º 1
0
 private void ResetMessagesCollection()
 {
     foreach (var message in MessagesCollection.ToList())
     {
         MessagesCollection.Remove(message);
     }
     if (SelectedContact != null)
     {
         PopulateMessageCollection();
     }
 }
Ejemplo n.º 2
0
 private void DeleteSelectedContact()
 {
     IMService.DeleteContact(LoggedInUser, GetSelectedUser());
     foreach (var contact in ContactsCollection.ToList())
     {
         if (contact.Username == SelectedContact.Username)
         {
             ContactsCollection.Remove(contact);
         }
     }
     foreach (var message in MessagesCollection.ToList())
     {
         MessagesCollection.Remove(message);
     }
     ResetContactsDetails();
 }