1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(genericchatform):separate messages from different days

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.
This commit is contained in:
PKEv 2016-04-23 03:37:38 +03:00
parent edc35ba9df
commit 8ebad59a3e

View File

@ -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)
{