Merge
commit
637105e5cf
|
|
@ -356,6 +356,11 @@ public:
|
|||
*/
|
||||
static void addNotifPanelToIM(const LLNotificationPtr& notification);
|
||||
|
||||
/**
|
||||
* Updates messages of IM floater.
|
||||
*/
|
||||
static void updateIMFLoaterMesages(const LLUUID& session_id);
|
||||
|
||||
/**
|
||||
* Updates messages of visible IM floater.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -252,6 +252,9 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
|
|||
session->mNumUnread = unread;
|
||||
session->mParticipantUnreadMessageCount = participant_unread;
|
||||
|
||||
// update IM floater messages
|
||||
updateIMFLoaterMesages(session_id);
|
||||
|
||||
// restore active session id
|
||||
if (active_session_id.isNull())
|
||||
{
|
||||
|
|
@ -414,6 +417,16 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
|
|||
LLIMModel::getInstance()->mNewMsgSignal(arg);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id)
|
||||
{
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
|
||||
if (im_floater != NULL && im_floater->getVisible())
|
||||
{
|
||||
im_floater->updateMessages();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification)
|
||||
{
|
||||
|
|
@ -421,11 +434,7 @@ void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notif
|
|||
LLUUID from_id = notification->getPayload()["from_id"];
|
||||
LLUUID session_id = spawnIMSession(name, from_id);
|
||||
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
|
||||
if (im_floater != NULL && im_floater->getVisible())
|
||||
{
|
||||
im_floater->updateMessages();
|
||||
}
|
||||
updateIMFLoaterMesages(session_id);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
Loading…
Reference in New Issue