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:
parent
2dc79a80bc
commit
624b73edc7
|
@ -212,12 +212,15 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
|
||||||
if(isAction)
|
if(isAction)
|
||||||
{
|
{
|
||||||
msg = ChatMessage::createChatMessage(authorStr, message, true, false, false);
|
msg = ChatMessage::createChatMessage(authorStr, message, true, false, false);
|
||||||
|
previousId.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg = ChatMessage::createChatMessage(authorStr, message, false, false, author.isMine());
|
msg = ChatMessage::createChatMessage(authorStr, message, false, false, author.isMine());
|
||||||
if(author == previousId)
|
if(author == previousId)
|
||||||
msg->hideSender();
|
msg->hideSender();
|
||||||
|
|
||||||
|
previousId = author;
|
||||||
}
|
}
|
||||||
|
|
||||||
insertChatMessage(msg);
|
insertChatMessage(msg);
|
||||||
|
@ -225,8 +228,6 @@ ChatMessage::Ptr GenericChatForm::addMessage(const ToxID& author, const QString
|
||||||
if(isSent)
|
if(isSent)
|
||||||
msg->markAsSent(datetime);
|
msg->markAsSent(datetime);
|
||||||
|
|
||||||
previousId = author;
|
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user