Skip to content
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

Is there any away to show label for days ? #3

Closed
edianogama opened this issue Sep 18, 2019 · 4 comments
Closed

Is there any away to show label for days ? #3

edianogama opened this issue Sep 18, 2019 · 4 comments

Comments

@edianogama
Copy link

Hi fayeed,
I need show a label for date messages like whatsapp from firebase.
june1
message1,
message2,
message3
june2
message1,
message2,
message3,

List<DocumentSnapshot> items = snapshot.data.documents;
         var messages =
             items.map((i) => ChatMessage.fromJson(i.data)).toList();

How would i do that ?

@fayeed
Copy link
Owner

fayeed commented Sep 18, 2019

Dash chat includes this behavior by default you can check the example in example folder for more detail:

@edianogama
Copy link
Author

I see, I had a test yesterday at 22pm and this morning, and the label didn't show up.
I tested now at 22pm and apparently it counted at 24 hours of the previous. I do not know for sure.
I believe it may be something set by the time zone.
Is there something like that in the settings? and something related to language?
Thank you, the other things, I managed to implement and thank you very much for your work, was perfect!

@fayeed
Copy link
Owner

fayeed commented Sep 19, 2019

It could be that one user might be in different timezone and another in another timezone that might lead to this problem, if thats the case I suggest you do the timezone conversion manually as you receive the message.

@edianogama
Copy link
Author

thanks for suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants