I am working on a chatbox where I need to show users' messages by grouping the messages on a particular date. The grouping has been working fine so far. However, I could not show the image of the user on his/her latest message if I sent consecutive messages. I have my code on sandbox where there is no issue on Feb 19 but in the case of Feb 22, only messages of 'How are you?' on the sender and receiver side should be shown profile picture and on the last message of Hello Man.here is eamxple
for an accurate answer i need to see the code, but there are multiple ways to do so.
one is if the message is not the last message from that user, you will delete the image,
other one is to only show the image in the last message
for better answer i need to see how you wrote your code