public override IMessageAvatarImageDataSource GetAvatarImageData(MessagesCollectionView collectionView, NSIndexPath indexPath)
 {
     if (messages[indexPath.Row].SenderId.Equals(CHATTER_ID))
     {
         return(MessagesAvatarImageFactory.CreateAvatarImage(UIImage.FromBundle("friend"), 25));
     }
     ;
     return(null);
 }
        public override IMessageAvatarImageDataSource GetAvatarImageData(MessagesCollectionView collectionView, NSIndexPath indexPath)
        {
            UIImage image = null;
            var     index = (int)indexPath.Item;

            if (messages[index].SenderId == AppSettingsManager.ClientId)
            {
                image = GravatarManager.GetImage(GravatarUser.Customer);
            }
            else
            {
                image = GravatarManager.GetImage(GravatarUser.Agent);
            }

            // Default is (34, 34) for diameter
            if (image != null)
            {
                return(MessagesAvatarImageFactory.CreateAvatarImage(image, 34));
            }

            return(null);
        }