More stabbing at the conversation floater: Make sure the contact and nearby chat floater connection gets initialized before anything else happens so tabs flash properly with offline IMs

Ansariel 2014-03-22 01:35:53 +01:00
parent 60a46a7502
commit e6757c8f6b
3 changed files with 10 additions and 6 deletions

View File

@ -86,12 +86,8 @@ BOOL FSFloaterIMContainer::postBuild()
return TRUE;
}
void FSFloaterIMContainer::onOpen(const LLSD& key)
void FSFloaterIMContainer::initTabs()
{
LLMultiFloater::onOpen(key);
LLFloater* active_floater = getActiveFloater();
// If we're using multitabs, and we open up for the first time
// Add localchat by default if it's not already on the screen somewhere else. -AO
// But only if it hasnt been already so we can reopen it to the same tab -KC
@ -140,7 +136,13 @@ void FSFloaterIMContainer::onOpen(const LLSD& key)
addFloater(floater_chat, TRUE);
}
}
}
void FSFloaterIMContainer::onOpen(const LLSD& key)
{
LLMultiFloater::onOpen(key);
LLFloater* active_floater = getActiveFloater();
if (active_floater && active_floater != getActiveFloater())
{
mTabContainer->selectTabPanel(active_floater);

View File

@ -74,6 +74,7 @@ public:
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {};
static void reloadEmptyFloaters();
void initTabs();
private:
enum eVoiceState

View File

@ -1747,7 +1747,8 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x,
// by the voice's events
// <FS:Ansariel> [FS communication UI]
//LLFloaterIMContainer::getInstance();
FSFloaterIMContainer::getInstance();
FSFloaterIMContainer* floater_imcontainer = FSFloaterIMContainer::getInstance();
floater_imcontainer->initTabs();
// <FS:ND> FIRE-3066: Force creation or FSFLoaterContacts here, this way it will register with LLAvatarTracker early enough.
// Otherwise it is only create if isChatMultriTab() == true and LLIMFloaterContainer::getInstance is called