CHUI-433: Problem: Toasts were not being displayed due to incorrect tracking of the current conversation with focus. Resolution: Now when a conversation gains focus it will set a flag to ignore toasts. And when a conversation loses focus it will set a flag to re-enable toasts.
parent
18e5fa5bbd
commit
b0c54dfd3e
|
|
@ -202,16 +202,10 @@ 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::getInstance()->setActiveSessionID(mSessionID);
|
||||
LLIMModel::instance().sendNoUnreadMessages(mSessionID);
|
||||
}
|
||||
|
||||
LLTransientDockableFloater::onFocusReceived();
|
||||
|
|
@ -219,6 +213,7 @@ void LLIMConversation::onFocusReceived()
|
|||
|
||||
void LLIMConversation::onFocusLost()
|
||||
{
|
||||
LLIMModel::getInstance()->resetActiveSessionID();
|
||||
setBackgroundOpaque(false);
|
||||
LLTransientDockableFloater::onFocusLost();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,8 +119,7 @@ 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"])
|
||||
if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -147,7 +146,7 @@ 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"]);
|
||||
if (open_im_floater && open_im_floater->getVisible())
|
||||
if (open_im_floater && open_im_floater->isInVisibleChain() && open_im_floater->hasFocus())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue