From 9963310a9455e0f8ce343536a5a8a09fcfdc46bb Mon Sep 17 00:00:00 2001 From: defnax Date: Fri, 25 Dec 2020 16:49:05 +0100 Subject: [PATCH] Fixed to display back the status message for private chat --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index ae135ab00..831fdb565 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -1842,13 +1842,16 @@ void ChatWidget::updateTitle() ui->titleLabel->setText(RsHtml::plainText(name) + "@" + RsHtml::plainText(title)); } -void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const QString& /*status_string*/) +void ChatWidget::updatePeersCustomStateString(const QString& peer_id, const QString& status_string) { + if (chatType() != CHATTYPE_PRIVATE ) + { + return; + } + QString status_text; - // TODO: fix peer_id and types and eveyrhing - /* - if (RsPeerId(peer_id.toStdString()) == peerId) { + if (RsPeerId(peer_id.toStdString()) == chatId.toPeerId()) { // the peers status string has changed if (status_string.isEmpty()) { ui->statusMessageLabel->hide(); @@ -1863,7 +1866,6 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const ui->statusLabel->setAlignment ( Qt::AlignVCenter ); } } - */ } void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)