Added chat status display

This commit is contained in:
defnax 2025-12-06 22:13:09 +01:00
parent 7873082d28
commit 1ab5ad0a8e

View file

@ -145,6 +145,8 @@ void PopupDistantChatDialog::handleEvent_main_thread(std::shared_ptr<const RsEve
getChatWidget()->updateStatusString("%1", tr( "Your partner closed the conversation." ), true ); getChatWidget()->updateStatusString("%1", tr( "Your partner closed the conversation." ), true );
getChatWidget()->blockSending(tr( "Your partner closed the conversation.")); getChatWidget()->blockSending(tr( "Your partner closed the conversation."));
getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
, tr("Your partner closed the conversation."), ChatWidget::MSGTYPE_SYSTEM);
setPeerStatus(RsStatusValue::RS_STATUS_OFFLINE) ; setPeerStatus(RsStatusValue::RS_STATUS_OFFLINE) ;
break ; break ;
@ -173,6 +175,8 @@ void PopupDistantChatDialog::handleEvent_main_thread(std::shared_ptr<const RsEve
msg = QObject::tr( "End-to-end encrypted conversation established"); msg = QObject::tr( "End-to-end encrypted conversation established");
getChatWidget()->updateStatusString("%1", msg, true); getChatWidget()->updateStatusString("%1", msg, true);
_status_label->setToolTip(msg); _status_label->setToolTip(msg);
getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
, tr("Tunnel is secured. You can talk!"), ChatWidget::MSGTYPE_SYSTEM);
getChatWidget()->unblockSending(); getChatWidget()->unblockSending();
setPeerStatus(RsStatusValue::RS_STATUS_ONLINE); setPeerStatus(RsStatusValue::RS_STATUS_ONLINE);
break; break;