fixed merge

This commit is contained in:
csoler 2025-12-05 17:09:39 +01:00
commit 296b612965
3 changed files with 15 additions and 17 deletions

View file

@ -239,25 +239,22 @@ void FriendsDialog::processSettings(bool bLoad)
void FriendsDialog::chatMessageReceived(const ChatMessage &msg) void FriendsDialog::chatMessageReceived(const ChatMessage &msg)
{ {
if(!msg.chat_id.isBroadcast()) if(!msg.chat_id.isBroadcast())
return; return;
if(ui.chatWidget->isActive()) QDateTime sendTime = DateTime::DateTimeFromTime_t(msg.sendTime);
{ QDateTime recvTime = DateTime::DateTimeFromTime_t(msg.recvTime);
QDateTime sendTime = DateTime::DateTimeFromTime_t(msg.sendTime); QString message = QString::fromUtf8(msg.msg.c_str());
QDateTime recvTime = DateTime::DateTimeFromTime_t(msg.recvTime); QString name = QString::fromUtf8(rsPeers->getPeerName(msg.broadcast_peer_id).c_str());
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); ui.chatWidget->addChatMsg(msg.incoming, name, sendTime, recvTime, message, ChatWidget::MSGTYPE_NORMAL);
if(ui.chatWidget->isActive()) if(ui.chatWidget->isActive())
{ {
// clear the chat notify when control returns to the Qt event loop // clear the chat notify when control returns to the Qt event loop
// we have to do this later, because we don't know if we or the notify receives the chat message first // we have to do this later, because we don't know if we or the notify receives the chat message first
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)

View file

@ -240,6 +240,7 @@ void NewsFeed::handlePostedEvent(std::shared_ptr<const RsEvent> event)
switch(pe->mPostedEventCode) switch(pe->mPostedEventCode)
{ {
case RsPostedEventCode::UPDATED_POSTED_GROUP:
case RsPostedEventCode::NEW_POSTED_GROUP: case RsPostedEventCode::NEW_POSTED_GROUP:
addFeedItem( new PostedGroupItem(this, NEWSFEED_POSTEDNEWLIST, pe->mPostedGroupId, false, true)); addFeedItem( new PostedGroupItem(this, NEWSFEED_POSTEDNEWLIST, pe->mPostedGroupId, false, true));
break; break;

View file

@ -23,7 +23,7 @@
#include "SecurityIpItem.h" #include "SecurityIpItem.h"
#include "FeedHolder.h" #include "FeedHolder.h"
#include"ui_SecurityIpItem.h" #include "ui_SecurityIpItem.h"
#include "retroshare-gui/RsAutoUpdatePage.h" #include "retroshare-gui/RsAutoUpdatePage.h"
#include "gui/connect/ConfCertDialog.h" #include "gui/connect/ConfCertDialog.h"
#include "util/DateTime.h" #include "util/DateTime.h"