Exemple #1
0
 void reorderContacts()
 {
     App.Current.Dispatcher.Invoke(() =>
     {
         if (ActiveConversations.Count > 0)
         {
             ActiveConversations = ActiveConversations.OrderByDescending(c => c.Contact.Online).ThenByDescending(c => c.LastMessageDate).ToList();
             OnPropertyChanged(nameof(ActiveConversations));
         }
     });
 }
Exemple #2
0
        private void _client_OnConversationHistoryReceived(object sender, List <Core.ProtoJson.Schema.ConversationState> e)
        {
            // associate contact list and last active conversation
            // only 1 to 1 conversation supported
            if (ActiveConversations == null)
            {
                ActiveConversations = new List <ConversationViewModel>();
            }

            foreach (Core.ProtoJson.Schema.ConversationState conversation in e)
            {
                ActiveConversations.Add(new ConversationViewModel(new Conversation(conversation)));
            }

            reorderContacts();
        }
Exemple #3
0
 private void _client_OnNewConversationCreated(object sender, Core.ProtoJson.Schema.ConversationState e)
 {
     ActiveConversations.Add(new ConversationViewModel(new Conversation(e)));
     reorderContacts();
 }