FIRE-9455: Chat console becomes invisible at various occasions

Ansariel 2013-03-14 09:30:42 +01:00
parent a4a025a24d
commit 9eeebe39a2
2 changed files with 13 additions and 5 deletions

View File

@ -32,6 +32,7 @@
#include "lggcontactsets.h"
#include "llagent.h"
#include "llconsole.h"
#include "llfloaternearbychat.h"
#include "llfloaterreg.h"
#include "llimview.h"
#include "llnotificationhandler.h"
@ -39,6 +40,13 @@
#include "llviewercontrol.h"
#include "rlvhandler.h"
// static
BOOL FSConsoleUtils::isNearbyChatVisible()
{
LLFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterNearbyChat>("nearby_chat", LLSD());
return nearby_chat->getVisible();
}
// static
bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args)
{
@ -96,7 +104,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
else
{
@ -119,7 +127,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
return true;
@ -175,7 +183,7 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
//static
@ -272,5 +280,5 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id,
}
gConsole->addConsoleLine("IM: " + senderName + delimiter + message, textColor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}

View File

@ -39,7 +39,7 @@ public:
static bool ProcessInstantMessage(const LLUUID& session_id, const LLUUID& from_id, const std::string& message);
protected:
static BOOL isNearbyChatVisible();
static void onProcessChatAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg);
static void onProccessInstantMessageNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group);