Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(genericchatform):separate messages from different days
Browse files Browse the repository at this point in the history
Before this new cut-off days is only shown when the load history, now added a feature which in the current chat checks the last post date and if the date does not coincide with current - output a system message about the new date.
  • Loading branch information
PKEv committed Apr 23, 2016
1 parent edc35ba commit 8ebad59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/widget/form/genericchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxId& author, const QString
bool authorIsActiveProfile = author.isSelf();
QString authorStr = authorIsActiveProfile ? Core::getInstance()->getUsername() : resolveToxId(author);

if (getLatestDate() != QDate::currentDate())
addSystemInfoMessage(QDate::currentDate().toString(Settings::getInstance().getDateFormat()), ChatMessage::INFO, QDateTime());

ChatMessage::Ptr msg;
if (isAction)
{
Expand Down

0 comments on commit 8ebad59

Please sign in to comment.