-
Notifications
You must be signed in to change notification settings - Fork 15
feature/conversationTime #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.