Right now I am writing a chat application I am having a list of messages initially when the message was sent it had status property sending after getting network confirmation it should update and change to sent after getting confirmation whether the message is received by the recipient it should change to delivered and then to seen what is the ideal approach to do this I thought a way to copy the properties of that message and after changing status insert that particular message at that index since my message class is immutable.
Thank you.