CHUI-286 ADD. FIX (Conversations floater opened by default when a new IM session is started (no IM toast shown)): repair toast's system - suppress toasts only if corresponding floater is visible

AlexanderP ProductEngine 2012-08-17 19:33:24 +03:00
parent 2097e61dcb
commit 3d2045877c
1 changed files with 3 additions and 2 deletions

View File

@ -97,12 +97,12 @@ void LLIMFloater::onFocusLost()
void LLIMFloater::onFocusReceived()
{
LLIMModel::getInstance()->setActiveSessionID(mSessionID);
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);
}
}
@ -726,6 +726,7 @@ void LLIMFloater::setVisible(BOOL visible)
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
LLTransientDockableFloater::setVisible(visible);
// update notification channel state