Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
commit
873d03e96f
|
|
@ -505,7 +505,7 @@ void LLFolderView::sanitizeSelection()
|
|||
|
||||
// ensure that each ancestor is open and potentially passes filtering
|
||||
BOOL visible = false;
|
||||
if(item->getViewModelItem())
|
||||
if(item->getViewModelItem() != NULL)
|
||||
{
|
||||
visible = item->getViewModelItem()->potentiallyVisible(); // initialize from filter state for this item
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,16 +202,9 @@ void LLIMConversation::onFocusReceived()
|
|||
{
|
||||
setBackgroundOpaque(true);
|
||||
|
||||
if (mSessionID.notNull())
|
||||
if (mSessionID.notNull() && isInVisibleChain())
|
||||
{
|
||||
LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true);
|
||||
|
||||
if (getVisible())
|
||||
{
|
||||
// suppress corresponding toast only if this floater is visible and have focus
|
||||
LLIMModel::getInstance()->setActiveSessionID(mSessionID);
|
||||
LLIMModel::instance().sendNoUnreadMessages(mSessionID);
|
||||
}
|
||||
LLIMModel::instance().sendNoUnreadMessages(mSessionID);
|
||||
}
|
||||
|
||||
LLTransientDockableFloater::onFocusReceived();
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ void toast_callback(const LLSD& msg){
|
|||
return;
|
||||
}
|
||||
|
||||
// check whether incoming IM belongs to an active session or not
|
||||
if (LLIMModel::getInstance()->getActiveSessionID().notNull()
|
||||
&& LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Skip toasting if we have open window of IM with this session id
|
||||
LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
|
||||
if (open_im_floater && open_im_floater->isInVisibleChain() && open_im_floater->hasFocus())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip toasting for system messages
|
||||
if (msg["from_id"].asUUID() == LLUUID::null)
|
||||
|
|
@ -145,30 +145,11 @@ void toast_callback(const LLSD& msg){
|
|||
return;
|
||||
}
|
||||
|
||||
// Skip toasting if we have open window of IM with this session id
|
||||
LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
|
||||
if (open_im_floater && open_im_floater->getVisible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLAvatarNameCache::get(msg["from_id"].asUUID(),
|
||||
boost::bind(&on_avatar_name_cache_toast,
|
||||
_1, _2, msg));
|
||||
}
|
||||
|
||||
void LLIMModel::setActiveSessionID(const LLUUID& session_id)
|
||||
{
|
||||
// check if such an ID really exists
|
||||
if (!findIMSession(session_id))
|
||||
{
|
||||
llwarns << "Trying to set as active a non-existent session!" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
mActiveSessionID = session_id;
|
||||
}
|
||||
|
||||
LLIMModel::LLIMModel()
|
||||
{
|
||||
addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1));
|
||||
|
|
|
|||
|
|
@ -147,13 +147,6 @@ public:
|
|||
|
||||
LLIMModel();
|
||||
|
||||
|
||||
//we should control the currently active session
|
||||
LLUUID mActiveSessionID;
|
||||
void setActiveSessionID(const LLUUID& session_id);
|
||||
void resetActiveSessionID() { mActiveSessionID.setNull(); }
|
||||
LLUUID getActiveSessionID() { return mActiveSessionID; }
|
||||
|
||||
/** Session id to session object */
|
||||
std::map<LLUUID, LLIMSession*> mId2SessionMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,13 +93,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
|
|||
}
|
||||
else
|
||||
{
|
||||
// store active session id
|
||||
const LLUUID & active_session_id =
|
||||
LLIMModel::instance().getActiveSessionID();
|
||||
|
||||
// set searched session as active to avoid IM toast popup
|
||||
LLIMModel::instance().setActiveSessionID(session_id);
|
||||
|
||||
S32 unread = session->mNumUnread;
|
||||
S32 participant_unread = session->mParticipantUnreadMessageCount;
|
||||
LLIMModel::instance().addMessageSilently(session_id, from, from_id,
|
||||
|
|
@ -110,16 +103,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
|
|||
|
||||
// update IM floater messages
|
||||
updateIMFLoaterMesages(session_id);
|
||||
|
||||
// restore active session id
|
||||
if (active_session_id.isNull())
|
||||
{
|
||||
LLIMModel::instance().resetActiveSessionID();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLIMModel::instance().setActiveSessionID(active_session_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue