private async void AddMessage(SMSReceivedMessage message)
 {
     //receiving a message from prospect whose messages are currently being viewed
     if (message.SMSActivityReceived.ProspectAddressBook == Prospect.ProspectAddressNumber)
     {
         //_showAlertInteraction.Raise();
         SmsMessages.Add(message.SMSActivityReceived);
         _hideAlertInteraction.Raise();
         var success = await _prospectService.UpdateProspectSMSActivityAsync(Prospect.ProspectAddressNumber);
     }
 }
Ejemplo n.º 2
0
        private void AddMessage(SMSReceivedMessage message)
        {
            //receiving a message from prospect update the appropriate row with the new data
            var tableRow = SMSActivities.FirstOrDefault(s => s.ProspectAddressBook == message.SMSActivityReceived.ProspectAddressBook);

            if (tableRow != null)
            {
                tableRow.UnreadCount++;
                tableRow.MessageBody = message.SMSActivityReceived.MessageBody;
                tableRow.UpdatedDate = message.SMSActivityReceived.UpdatedDate;

                var request = new TableRow {
                    TableRowToUpdate = SMSActivities.IndexOf(tableRow)
                };
                _updateRowInteraction.Raise(request);
            }
        }