Skip to content
Snippets Groups Projects
Commit 6d47f6e8 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix weird ctrl-w behavior on nearby chat

parent 4a8bc5a2
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -183,28 +183,17 @@ BOOL LLFloaterIMNearbyChat::postBuild()
// virtual
void LLFloaterIMNearbyChat::closeHostedFloater()
{
// If detached from conversations window close anyway
if (!getHost())
{
setVisible(FALSE);
}
LLFloaterEmojiPicker::saveState();
// Should check how many conversations are ongoing. Select next to "Nearby Chat" in case there are some other besides.
// Close conversations window in case "Nearby Chat" is attached and the only conversation
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
if (floater_container->getConversationListItemSize() == 1)
if (getHost())
{
if (getHost())
{
floater_container->closeFloater();
}
floater_container->closeFloater();
}
else
else // If detached from conversations window close anyway
{
if (!getHost())
{
floater_container->selectNextConversationByID(LLUUID());
}
closeFloater();
floater_container->selectNextConversationByID(LLUUID());
}
}
......@@ -212,28 +201,15 @@ void LLFloaterIMNearbyChat::closeFloater(bool app_quitting)
{
LLFloaterEmojiPicker::saveState();
// If detached from conversations window close anyway
if (!getHost())
{
LLFloaterIMSessionTab::closeFloater(app_quitting);
}
// Should check how many conversations are ongoing. Select next to "Nearby Chat" in case there are some other besides.
// Close conversations window in case "Nearby Chat" is attached and the only conversation
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
if (floater_container->getConversationListItemSize() == 1)
if (getHost())
{
if (getHost())
{
floater_container->closeFloater(app_quitting);
}
LLFloaterIMContainer::getInstance()->closeFloater(app_quitting);
}
else
else // If detached from conversations window close anyway
{
if (!getHost())
{
floater_container->selectNextConversationByID(LLUUID());
}
LLFloaterIMSessionTab::closeFloater(app_quitting);
floater_container->selectNextConversationByID(LLUUID());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment