From 804cd4f88aec784550fce0f26702ff31f951ca51 Mon Sep 17 00:00:00 2001 From: Flakebi Date: Wed, 11 Mar 2015 16:01:24 +0100 Subject: [PATCH] Inline funtion calls --- src/widget/form/groupchatform.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index 324f41dd8..32bed5cc5 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -101,11 +101,9 @@ void GroupChatForm::onSendTriggered() msgEdit->setLastMessage(msg); msgEdit->clear(); - bool isAction = msg.startsWith("/me "); - if (group->getPeersCount() != 1) { - if (isAction) + if (msg.startsWith("/me ")) { msg = msg.right(msg.length() - 4); emit sendAction(group->getGroupId(), msg); @@ -114,10 +112,7 @@ void GroupChatForm::onSendTriggered() emit sendMessage(group->getGroupId(), msg); } else - { - QDateTime timestamp = QDateTime::currentDateTime(); - addSelfMessage(msg, isAction, timestamp, true); - } + addSelfMessage(msg, msg.startsWith("/me "), QDateTime::currentDateTime(), true); } void GroupChatForm::onUserListChanged()