mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug with default chat lobby identity causing settings to show an empty list. Also fixed up GxsIdChooser
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8081 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
24c421c0b7
commit
9d2b6faf9c
1
TODO.txt
1
TODO.txt
@ -66,6 +66,7 @@ H [ ] Distant chat should work with shared identities
|
||||
[X] Distant chat fails (tunnel bullet never gets green) when re-openning a distant chat window after closing a tunnel
|
||||
[X] Distant chat fails (chat window never appears) when re-openning a distant chat window after closing a tunnel
|
||||
[X] You should not be enabled to distant-chat yourself!
|
||||
[ ] Nickname completion is broken. It only works with @
|
||||
|
||||
Identities:
|
||||
[X] "Owned by you" => "Owned by node [nodename]"
|
||||
|
@ -1566,9 +1566,27 @@ bool DistributedChatService::setDefaultIdentityForChatLobby(const RsGxsId& nick)
|
||||
bool DistributedChatService::getDefaultIdentityForChatLobby(RsGxsId& nick)
|
||||
{
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
nick = _default_identity ;
|
||||
|
||||
nick = locked_getDefaultIdentity() ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
RsGxsId DistributedChatService::locked_getDefaultIdentity()
|
||||
{
|
||||
if(_default_identity.isNull() && rsIdentity!=NULL)
|
||||
{
|
||||
std::list<RsGxsId> own_ids ;
|
||||
rsIdentity->getOwnIds(own_ids) ;
|
||||
|
||||
if(!own_ids.empty())
|
||||
{
|
||||
_default_identity = own_ids.front() ;
|
||||
triggerConfigSave();
|
||||
}
|
||||
}
|
||||
return _default_identity ;
|
||||
}
|
||||
bool DistributedChatService::getIdentityForChatLobby(const ChatLobbyId& lobby_id,RsGxsId& nick)
|
||||
{
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
@ -130,6 +130,7 @@ class DistributedChatService
|
||||
|
||||
bool locked_initLobbyBouncableObject(const ChatLobbyId& id,RsChatLobbyBouncingObject&) ;
|
||||
void locked_printDebugInfo() const ;
|
||||
RsGxsId locked_getDefaultIdentity();
|
||||
|
||||
static ChatLobbyVirtualPeerId makeVirtualPeerId(ChatLobbyId) ;
|
||||
static uint64_t makeConnexionChallengeCode(const RsPeerId& peer_id,ChatLobbyId lobby_id,ChatLobbyMsgId msg_id) ;
|
||||
|
@ -306,9 +306,10 @@ void GxsIdChooser::indexActivated(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void GxsIdChooser::updateDisplay(bool complete)
|
||||
void GxsIdChooser::updateDisplay(bool reset)
|
||||
{
|
||||
Q_UNUSED(complete)
|
||||
if(reset)
|
||||
mFirstLoad = true ;
|
||||
|
||||
/* Update identity list */
|
||||
loadPrivateIds();
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
void updateDisplay(bool complete);
|
||||
void updateDisplay(bool reset);
|
||||
|
||||
private slots:
|
||||
void fillDisplay(bool complete);
|
||||
|
@ -272,7 +272,9 @@ ChatPage::load()
|
||||
RsGxsId gxs_id ;
|
||||
rsMsgs->getDefaultIdentityForChatLobby(gxs_id) ;
|
||||
|
||||
ui.chatLobbyIdentity_IC->loadIds(IDCHOOSER_ID_REQUIRED, gxs_id);
|
||||
ui.chatLobbyIdentity_IC->setFlags(IDCHOOSER_ID_REQUIRED) ;
|
||||
|
||||
if(!gxs_id.isNull())
|
||||
ui.chatLobbyIdentity_IC->setChosenId(gxs_id);
|
||||
|
||||
uint chatflags = Settings->getChatFlags();
|
||||
|
Loading…
Reference in New Issue
Block a user