Merge pull request #3065 from JohannesKleine/fix-merge-error

remove duplicate code introduced by merging
This commit is contained in:
csoler 2025-12-05 17:08:27 +01:00 committed by GitHub
commit 01cdbe68d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -242,15 +242,6 @@ void FriendsDialog::chatMessageReceived(const ChatMessage &msg)
if(!msg.chat_id.isBroadcast()) if(!msg.chat_id.isBroadcast())
return; return;
QDateTime sendTime = QDateTime::fromTime_t(msg.sendTime);
QDateTime recvTime = QDateTime::fromTime_t(msg.recvTime);
QString message = QString::fromUtf8(msg.msg.c_str());
QString name = QString::fromUtf8(rsPeers->getPeerName(msg.broadcast_peer_id).c_str());
ui.chatWidget->addChatMsg(msg.incoming, name, sendTime, recvTime, message, ChatWidget::MSGTYPE_NORMAL);
if(ui.chatWidget->isActive())
{
QDateTime sendTime = DateTime::DateTimeFromTime_t(msg.sendTime); QDateTime sendTime = DateTime::DateTimeFromTime_t(msg.sendTime);
QDateTime recvTime = DateTime::DateTimeFromTime_t(msg.recvTime); QDateTime recvTime = DateTime::DateTimeFromTime_t(msg.recvTime);
QString message = QString::fromUtf8(msg.msg.c_str()); QString message = QString::fromUtf8(msg.msg.c_str());
@ -265,7 +256,6 @@ void FriendsDialog::chatMessageReceived(const ChatMessage &msg)
QMetaObject::invokeMethod(this, "clearChatNotify", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "clearChatNotify", Qt::QueuedConnection);
} }
} }
}
void FriendsDialog::chatStatusReceived(const ChatId &chat_id, const QString &status_string) void FriendsDialog::chatStatusReceived(const ChatId &chat_id, const QString &status_string)
{ {