Show IMs in console also if sender's IM panel has focus

Ansariel 2012-02-19 12:29:00 +01:00
parent 6a2cdf9970
commit b7d7323345
1 changed files with 10 additions and 2 deletions

View File

@ -125,7 +125,11 @@ void toast_callback(const LLSD& msg){
// check whether incoming IM belongs to an active session or not
if (LLIMModel::getInstance()->getActiveSessionID().notNull()
&& LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
// <FS:Ansariel> Don't abort if we want to log in chat console and the IM floater has focus
// && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
&& LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]
&& !gSavedSettings.getBOOL("FSLogImToChatConsole"))
// </FS:Ansariel> Don't abort if we want to log in chat console and the IM floater has focus
{
return;
}
@ -152,16 +156,20 @@ void toast_callback(const LLSD& msg){
// Skip toasting if we have open window of IM with this session id
LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
// <FS:Ansariel> Don't abort if we want to log in chat console
//if (open_im_floater && open_im_floater->getVisible())
if (open_im_floater && open_im_floater->getVisible() && !gSavedSettings.getBOOL("FSLogImToChatConsole"))
// </FS:Ansariel> Don't abort if we want to log in chat console
{
return;
}
// Ansariel: Don't toast if the message is an announcement
// <FS:Ansariel> Don't toast if the message is an announcement
if (msg["is_announcement"].asBoolean())
{
return;
}
// </FS:Ansariel> Don't toast if the message is an announcement
LLAvatarNameCache::get(msg["from_id"].asUUID(),
boost::bind(&on_avatar_name_cache_toast,