CHUI-349 (Crash when clicking on nearby chat toast):
removed a faulty method LLIMFloater::addToIMContainer; replaced it's calls to calls of its correct twin - LLIMFloater::addToHostmeow-7.2.2
parent
4a41aa8fad
commit
507b66aeb1
|
|
@ -582,13 +582,14 @@ void LLIMFloater::onParticipantsListChanged(LLUICtrl* ctrl)
|
|||
build_names_string(temp_uuids, ui_title);
|
||||
updateSessionName(ui_title, ui_title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id)
|
||||
void LLIMFloater::addToHost(const LLUUID& session_id, const bool force)
|
||||
{
|
||||
if (!gIMMgr->hasSession(session_id))
|
||||
return NULL;
|
||||
if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Test the existence of the floater before we try to create it
|
||||
bool exist = findInstance(session_id);
|
||||
|
|
@ -612,19 +613,22 @@ LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id)
|
|||
}
|
||||
}
|
||||
|
||||
if (floater_container && floater_container->getVisible())
|
||||
if (force)
|
||||
{
|
||||
floater->openFloater(floater->getKey());
|
||||
floater->setVisible(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
floater->setVisible(FALSE);
|
||||
if (floater_container && floater_container->getVisible())
|
||||
{
|
||||
floater->openFloater(floater->getKey());
|
||||
floater->setVisible(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
floater->setVisible(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return floater;
|
||||
}
|
||||
|
||||
|
||||
//static
|
||||
LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
|
||||
{
|
||||
|
|
@ -1323,23 +1327,6 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id )
|
|||
{
|
||||
LLIMFloater::addToHost(session_id);
|
||||
}
|
||||
void LLIMFloater::addToHost(const LLUUID& session_id)
|
||||
{
|
||||
if (LLIMConversation::isChatMultiTab())
|
||||
{
|
||||
LLIMFloaterContainer* im_box = LLIMFloaterContainer::findInstance();
|
||||
if (!im_box)
|
||||
{
|
||||
im_box = LLIMFloaterContainer::getInstance();
|
||||
}
|
||||
|
||||
if (im_box && !LLIMFloater::findInstance(session_id))
|
||||
{
|
||||
LLIMFloater* new_tab = LLIMFloater::getInstance(session_id);
|
||||
im_box->addFloater(new_tab, FALSE, LLTabContainer::END);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boost::signals2::connection LLIMFloater::setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,14 +71,13 @@ public:
|
|||
|
||||
static LLIMFloater* findInstance(const LLUUID& session_id);
|
||||
static LLIMFloater* getInstance(const LLUUID& session_id);
|
||||
static void addToHost(const LLUUID& session_id);
|
||||
static void addToHost(const LLUUID& session_id, const bool force = false);
|
||||
|
||||
// LLFloater overrides
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
|
||||
// Make IM conversion visible and update the message history
|
||||
static LLIMFloater* show(const LLUUID& session_id);
|
||||
static LLIMFloater* addToIMContainer(const LLUUID& session_id);
|
||||
|
||||
// Toggle panel specified by session_id
|
||||
// Returns true iff panel became visible
|
||||
|
|
|
|||
|
|
@ -86,13 +86,13 @@ LLIMFloaterContainer::~LLIMFloaterContainer()
|
|||
|
||||
void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
|
||||
{
|
||||
LLIMFloater::addToIMContainer(session_id);
|
||||
LLIMFloater::addToHost(session_id, true);
|
||||
addConversationListItem(session_id);
|
||||
}
|
||||
|
||||
void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
|
||||
{
|
||||
LLIMFloater::addToIMContainer(session_id);
|
||||
LLIMFloater::addToHost(session_id, true);
|
||||
addConversationListItem(session_id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue