added avatars for GXS ids in distant chat

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7928 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-02-08 17:38:30 +00:00
parent a7b902a0ee
commit b731999f99
4 changed files with 33 additions and 9 deletions

View file

@ -63,8 +63,11 @@ void PopupDistantChatDialog::init(const RsGxsId &gxs_id,const QString & title)
_pid = gxs_id ;
PopupChatDialog::init(ChatId(gxs_id), title) ;
// hide avatar frame, because it does not have funcntionality for gxs
showAvatarFrame(false);
RsGxsId own_gxs_id ;
uint32_t status ;
if(rsMsgs->getDistantChatStatus(gxs_id,status,&own_gxs_id))
ui.ownAvatarWidget->setOwnId(own_gxs_id);
}
void PopupDistantChatDialog::updateDisplay()
@ -164,5 +167,14 @@ QString PopupDistantChatDialog::getPeerName(const ChatId &id) const
QString PopupDistantChatDialog::getOwnName() const
{
return QString("me (TODO: gxs-name)");
uint32_t status= RS_DISTANT_CHAT_STATUS_UNKNOWN;
RsGxsId from_gxs_id ;
rsMsgs->getDistantChatStatus(_pid,status,&from_gxs_id) ;
RsIdentityDetails details ;
if(rsIdentity->getIdDetails(from_gxs_id,details))
return QString::fromUtf8( details.mNickname.c_str() ) ;
else
return QString::fromStdString(from_gxs_id.toStdString()) ;
}