mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 04:44:25 -04:00
fixed GUI for distant chat: correct display of peer names, chat window on client shows up when chat is openned. Window on server only shows up when first message is received.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7688 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8480d46eb5
commit
fd20f629dc
5 changed files with 139 additions and 130 deletions
|
@ -224,8 +224,7 @@ void ChatWidget::init(const RsPeerId &peerId, const QString &title)
|
|||
mChatType = CHATTYPE_LOBBY;
|
||||
} else {
|
||||
uint32_t status;
|
||||
RsGxsId gxs_id;
|
||||
if (rsMsgs->getDistantChatStatus(peerId, gxs_id, status)) {
|
||||
if (rsMsgs->getDistantChatStatus(RsGxsId(peerId), status)) {
|
||||
mChatType = CHATTYPE_DISTANT;
|
||||
} else {
|
||||
mChatType = CHATTYPE_PRIVATE;
|
||||
|
@ -1299,15 +1298,14 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
|
|||
|
||||
QString peerName ;
|
||||
uint32_t stts ;
|
||||
RsGxsId gxs_id ;
|
||||
|
||||
if(rsMsgs->getDistantChatStatus(peerId,gxs_id,stts))
|
||||
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),stts))
|
||||
{
|
||||
RsIdentityDetails details ;
|
||||
if(rsIdentity->getIdDetails(gxs_id,details))
|
||||
if(rsIdentity->getIdDetails(RsGxsId(peerId),details))
|
||||
peerName = QString::fromUtf8( details.mNickname.c_str() ) ;
|
||||
else
|
||||
peerName = QString::fromStdString(gxs_id.toStdString()) ;
|
||||
peerName = QString::fromStdString(peerId.toStdString()) ;
|
||||
}
|
||||
else
|
||||
peerName = QString::fromUtf8(rsPeers->getPeerName(peerId).c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue