mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
force loading of own ID to get a proper name to display in chat lobby dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8259 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
76fdbce10d
commit
7fd2b214d5
@ -215,7 +215,15 @@ void ChatLobbyDialog::init()
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
|
||||
RsIdentityDetails details ;
|
||||
rsIdentity->getIdDetails(gxs_id,details) ;
|
||||
|
||||
// This lets the backend some time to load our own identity in cache.
|
||||
// It will only loop for at most 1 second the first time.
|
||||
|
||||
for(int i=0;i<3;++i)
|
||||
if(rsIdentity->getIdDetails(gxs_id,details))
|
||||
break ;
|
||||
else
|
||||
usleep(1000*300) ;
|
||||
|
||||
ui.chatWidget->setName(QString::fromUtf8(details.mNickname.c_str()));
|
||||
//ui.chatWidget->addToolsAction(ui.actionChangeNickname);
|
||||
@ -286,7 +294,7 @@ void ChatLobbyDialog::setIdentity(const RsGxsId& gxs_id)
|
||||
{
|
||||
rsMsgs->setIdentityForChatLobby(lobbyId, gxs_id) ;
|
||||
|
||||
// get new nick name
|
||||
// get new nick name
|
||||
RsGxsId newid;
|
||||
|
||||
if (rsMsgs->getIdentityForChatLobby(lobbyId, newid))
|
||||
@ -295,7 +303,7 @@ void ChatLobbyDialog::setIdentity(const RsGxsId& gxs_id)
|
||||
rsIdentity->getIdDetails(gxs_id,details) ;
|
||||
|
||||
ui.chatWidget->setName(QString::fromUtf8(details.mNickname.c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user