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

Feature : Show conversation history - part 3 - display message's time #238

Merged
merged 12 commits into from
Jul 28, 2021

Conversation

ohassine
Copy link
Member

What's new in this PR?

This PR is a follow up of #235.
In this PR we handle displaying message's time with the corresponding separator.
It aims also to display a message's time when the user taps on that one.

Time separators

We have two types of time separators :

  • The first one with a gray background
  • The second one with horizantal line

When should we display each type of time separators ?

  • The separator with a gray background is displayed before the first received message of the day.
  • The separator with horizental line is displayed when the period between the current message and the previous message is more than 60 minutes

Separator's content

The content time of each type of separators is following the same logic as described below:

  • Display JUST NOW when the message is received in the last 2 minutes from now
  • Display x AGO when the message is received in the last 60 minutes from now
  • Display a date without a year (EEE, MMM d, HH:mm) when the message is received in the current year
  • Display a date with a year (EEE, MMM d, yyyy, HH:mm) for old messages that are not send a year ago or more

Screenshoots

Portrait Portrait RTL Dark mode
Screenshot_1626901528 Screenshot_1626938748 Screenshot_1626902646
Landscape
Screenshot_1626901559
Landscape RTL
Screenshot_1626938372
Landscape Dark mode
Screenshot_1626902654

Copy link
Contributor

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few details here and there, but overall it looks great :)

Looking forward to have the sending and receiving of messages working!

@ohassine ohassine merged commit 6cb7c5a into main Jul 28, 2021
@ohassine ohassine deleted the show_conversation_history_part3 branch July 28, 2021 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants