Good Day
I Managed to do a lot with the Chat Control but i hit a few problems but managed to have work arounds . Now the Chat that is based on text only works perfectly fine and now i am bringing images and i have implemented the Templates for different kinds of messages, images, receiver and Sender and later will do a video if i can make this work on images. The images are not consistent. i am attaching png of small sizes like this one
Example Image this image is 61kb , if it is viewed it should show immediately , but it does not . Let me explain my process
Step 1 : i Store an Image file on the server
Step 2 : Make an Entry of that image on the DB (image url )
Step 3 : Make an Entry of just attached image on the Chat Control like this
try
{
Author senderitem = new Author();
senderitem.Name = model.AUTHOR;
TextMessage textMessage = new TextMessage();
textMessage.Data = model;
textMessage.Author = senderitem;
textMessage.Text = model.ATTACHEMENTURL;
Device.BeginInvokeOnMainThread(() =>
{
this.chat.Items.Add(textMessage);
});
}
catch (Exception ex)
{
await DisplayAlert("Error:".Translate(), ex.Message, "Ok".Translate());
}
and after i do that i get an empty white item on the chat control
Image that shows an empty item
Now when i close my window or open it again i load the chats , it loads the images fast like as it does here
sometimes images load immediately after attaching them, but most of the time i have to close the chat control and open it again and it loads the image images. i have a video showing the behavior here
Thanks