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

fix: Remove old ChatForm code from Widget

Remove double status messages
This commit is contained in:
Diadlo 2017-01-10 00:46:38 +03:00
parent 3b56a6ec2a
commit 52642578a0
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -1084,44 +1084,6 @@ void Widget::onFriendStatusChanged(int friendId, Status status)
}
ContentDialog::updateFriendStatus(friendId);
if (Settings::getInstance().getStatusChangeNotificationEnabled())
{
QString fStatus = "";
switch (f->getStatus())
{
case Status::Away:
fStatus = tr("away", "contact status");
break;
case Status::Busy:
fStatus = tr("busy", "contact status");
break;
case Status::Offline:
fStatus = tr("offline", "contact status");
// Hide the "is typing" message when a friend goes offline
f->getChatForm()->setFriendTyping(false);
break;
case Status::Online:
fStatus = tr("online", "contact status");
break;
}
if (isActualChange)
{
QString message = tr("%1 is now %2", "e.g. \"Dubslow is now online\"")
.arg(f->getDisplayedName()).arg(fStatus);
f->getChatForm()->addSystemInfoMessage(message, ChatMessage::INFO,
QDateTime::currentDateTime());
}
}
if (isActualChange && status != Status::Offline)
{
// wait a little
OfflineMsgEngine* ome = f->getChatForm()->getOfflineMsgEngine();
QTimer::singleShot(250, ome, SLOT(deliverOfflineMsgs()));
}
}
void Widget::onFriendStatusMessageChanged(int friendId, const QString& message)