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

Inline funtion calls

This commit is contained in:
Flakebi 2015-03-11 16:01:24 +01:00
parent 4920f2a2d4
commit 804cd4f88a

View File

@ -101,11 +101,9 @@ void GroupChatForm::onSendTriggered()
msgEdit->setLastMessage(msg); msgEdit->setLastMessage(msg);
msgEdit->clear(); msgEdit->clear();
bool isAction = msg.startsWith("/me ");
if (group->getPeersCount() != 1) if (group->getPeersCount() != 1)
{ {
if (isAction) if (msg.startsWith("/me "))
{ {
msg = msg.right(msg.length() - 4); msg = msg.right(msg.length() - 4);
emit sendAction(group->getGroupId(), msg); emit sendAction(group->getGroupId(), msg);
@ -114,10 +112,7 @@ void GroupChatForm::onSendTriggered()
emit sendMessage(group->getGroupId(), msg); emit sendMessage(group->getGroupId(), msg);
} }
else else
{ addSelfMessage(msg, msg.startsWith("/me "), QDateTime::currentDateTime(), true);
QDateTime timestamp = QDateTime::currentDateTime();
addSelfMessage(msg, isAction, timestamp, true);
}
} }
void GroupChatForm::onUserListChanged() void GroupChatForm::onUserListChanged()