patch from phenom to fix date display in chat history

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6638 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-08-28 20:25:06 +00:00
parent c3af05b0bf
commit 08a8868865

View File

@ -526,7 +526,6 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
bool addDate = false; bool addDate = false;
if (QDate::currentDate()>lastMsgDate) if (QDate::currentDate()>lastMsgDate)
{ {
lastMsgDate=QDate::currentDate();
addDate=true; addDate=true;
} }
@ -560,6 +559,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
} else if (chatType == TYPE_SYSTEM) { } else if (chatType == TYPE_SYSTEM) {
type = ChatStyle::FORMATMSG_SYSTEM; type = ChatStyle::FORMATMSG_SYSTEM;
} else if (chatType == TYPE_HISTORY || addDate) { } else if (chatType == TYPE_HISTORY || addDate) {
lastMsgDate=QDate::currentDate();
type = incoming ? ChatStyle::FORMATMSG_HINCOMING : ChatStyle::FORMATMSG_HOUTGOING; type = incoming ? ChatStyle::FORMATMSG_HINCOMING : ChatStyle::FORMATMSG_HOUTGOING;
} else { } else {
type = incoming ? ChatStyle::FORMATMSG_INCOMING : ChatStyle::FORMATMSG_OUTGOING; type = incoming ? ChatStyle::FORMATMSG_INCOMING : ChatStyle::FORMATMSG_OUTGOING;