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

clear previous id on action (issue #7)

This commit is contained in:
krepa098 2015-02-07 22:55:42 +01:00
parent 2dc79a80bc
commit 624b73edc7

View File

@ -212,12 +212,15 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
if(isAction)
{
msg = ChatMessage::createChatMessage(authorStr, message, true, false, false);
previousId.clear();
}
else
{
msg = ChatMessage::createChatMessage(authorStr, message, false, false, author.isMine());
if(author == previousId)
msg->hideSender();
previousId = author;
}
insertChatMessage(msg);
@ -225,8 +228,6 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
if(isSent)
msg->markAsSent(datetime);
previousId = author;
return msg;
}