Conversation
Added timestamp for new sending message with Timestamp.now()
Added Timestamp value
Added sorting option with using conversation time.
safaorhan
left a comment
There was a problem hiding this comment.
Everything seems fine to me except one thing.
Can you change that so I can review it again?
| public void onSuccess(DocumentReference documentReference) { | ||
| conversationRef | ||
| .update("lastMessage", documentReference) | ||
| .update("lastMessage", documentReference, "conversationTime", Timestamp.now()) |
There was a problem hiding this comment.
I think you don't need to send conversationTime since it's annotated as @ServerTimestamp.
It should get updated everytime you do an update.
There was a problem hiding this comment.
I tried it but it didn't update. It creates time stamp when conversation created. Because of that, I added this line. I added it to order last updated conversation. If you prefer I can add a new timestamp and we have created time and last updated time.
|
And also please name your pull requests properly :) Patch1 is not close to a good PR title 😄 |
|
I changed it. |
ozkanbolukbas
left a comment
There was a problem hiding this comment.
I changed the name :)
| public void onSuccess(DocumentReference documentReference) { | ||
| conversationRef | ||
| .update("lastMessage", documentReference) | ||
| .update("lastMessage", documentReference, "conversationTime", Timestamp.now()) |
There was a problem hiding this comment.
I tried it but it didn't update. It creates time stamp when conversation created. Because of that, I added this line. I added it to order last updated conversation. If you prefer I can add a new timestamp and we have created time and last updated time.
Time added for conversation and sorting option added to conversation adapter.