mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 23:45:49 -04: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
1 changed files with 11 additions and 3 deletions
|
@ -215,7 +215,15 @@ void ChatLobbyDialog::init()
|
||||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||||
|
|
||||||
RsIdentityDetails details ;
|
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->setName(QString::fromUtf8(details.mNickname.c_str()));
|
||||||
//ui.chatWidget->addToolsAction(ui.actionChangeNickname);
|
//ui.chatWidget->addToolsAction(ui.actionChangeNickname);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue