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

Date separator is wrong on inverted list #124

Open
edukun opened this issue Aug 7, 2020 · 5 comments
Open

Date separator is wrong on inverted list #124

edukun opened this issue Aug 7, 2020 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@edukun
Copy link

edukun commented Aug 7, 2020

Describe the bug
When inverted: true, date separator doesn't work as expected.

To Reproduce

  • Add 2 messages, dates 2nd of August and 5th of August, current user
  • Add one message, date 7th of August, other user

Expected behavior
Three different date separators, only found 2 and with wrong date

Screenshots
First screenshot, inverted: true, where the problem occurs.
inverted_true

Second screenshot, inverted: false, all ok.
inverted_false

  • OS: Mac
  • Device: Samsung Galaxy S9
  • Flutter Version: Flutter (Channel dev, 1.21.0-1.0.pre, on Mac OS X 10.15.5)
  • Dart Version: 2.9.0
  • Dash Chat Version: 1.1.14
@edukun
Copy link
Author

edukun commented Aug 7, 2020

Changing the date of most recent message to two weeks ago, the problem shows too

inverted_true_2

@SebastienBtr SebastienBtr added the bug Something isn't working label Aug 8, 2020
@edukun
Copy link
Author

edukun commented Aug 18, 2020

@SebastienBtr any comments on this bug?

@SebastienBtr
Copy link
Collaborator

it seems to appear only for the first message, I didn't have time to check the code so I don't know exactly why it happens. I'll check that when I have more time. There is multiple issues with the date separator apparently, I'd honestly suggest to maybe not use it and wait for the v2. Anyway your issue is maybe quick to fix so I'll keep you updated.

@edukun
Copy link
Author

edukun commented Aug 18, 2020 via email

@DarkPhanuel
Copy link

You can also use a sorting function based on date to fix it, with something like this:

messages.sort((messageA, messageB) =>
messageB.createdAt.compareTo(messageA.createdAt));

@SebastienBtr SebastienBtr added the wontfix This will not be worked on label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants