FS communication UI: Fixing notification handlers

master
Ansariel 2013-06-29 04:13:30 +02:00
parent 436b9d0262
commit ae6d93f759
2 changed files with 12 additions and 7 deletions

View File

@ -77,9 +77,8 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification)
LLUUID from_id = notification->getPayload()["from_id"];
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id);
// <FS:Ansariel> [FS communication UI]
//LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id); <FS:TM> CHUI Merge new
//return LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); <FS:TM> CHUI Merge old
return LLFloaterReg::findTypedInstance<FSFloaterIM>("fs_impanel", session_id);
//LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id);
FSFloaterIM* im_floater = LLFloaterReg::findTypedInstance<FSFloaterIM>("fs_impanel", session_id);
// </FS:Ansariel> [FS communication UI]
if (im_floater != NULL)

View File

@ -28,8 +28,10 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llfloaterreg.h"
#include "llfloaterimnearbychat.h"
#include "llfloaterimnearbychat.h"
// <FS:Ansariel> [FS communication UI]
//#include "llfloaterimnearbychat.h"
#include "fsfloaternearbychat.h"
// </FS:Ansariel> [FS communication UI]
#include "llnotificationhandler.h"
#include "llnotifications.h"
#include "lltoastnotifypanel.h"
@ -86,8 +88,12 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
// don't show toast if Nearby Chat is opened
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
if (nearby_chat->isChatVisible())
// <FS:Ansariel> [FS communication UI]
//LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
//if (nearby_chat->isChatVisible())
FSFloaterNearbyChat* nearby_chat = FSFloaterNearbyChat::getInstance();
// </FS:Ansariel> [FS communication UI]
if (nearby_chat->getVisible())
{
return false;
}