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:
csoler 2014-11-17 21:56:41 +00:00
parent 8480d46eb5
commit fd20f629dc
5 changed files with 139 additions and 130 deletions

View file

@ -138,20 +138,15 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
PopupChatDialog::closeEvent(e) ;
}
QString PopupDistantChatDialog::getPeerName(const RsGxsId& id) const
QString PopupDistantChatDialog::getPeerName(const RsPeerId& id) const
{
uint32_t status ;
uint32_t status ;
if(rsMsgs->getDistantChatStatus(id,status))
{
RsIdentityDetails details ;
RsIdentityDetails details ;
if(rsIdentity->getIdDetails(RsGxsId(id),details))
return QString::fromUtf8( details.mNickname.c_str() ) ;
else
return QString::fromStdString(id.toStdString()) ;
}
else
return ChatDialog::getPeerName(RsPeerId(id)) ;
return QString::fromUtf8( details.mNickname.c_str() ) ;
else
return QString::fromStdString(id.toStdString()) ;
}