summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationhandlerutil.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-18 16:57:52 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-18 16:57:52 +0000
commitb5f9e437ea17dd9f1f3e186d6f2bf7108c279ce1 (patch)
treef5a73b7cab3cbe4e4dcf112bc34339472a74e83a /indra/newview/llnotificationhandlerutil.cpp
parent67af47fd8676718aff3f75d28b1cd9dd77e2ca3e (diff)
parent8e134590e6651ba36ba9d38ccf10fae249645299 (diff)
PE merge.
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 35569cffac..c187ee7bf2 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -94,7 +94,8 @@ bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification)
// static
bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification)
{
- return OFFER_FRIENDSHIP == notification->getName();
+ return OFFER_FRIENDSHIP == notification->getName()
+ || USER_GIVE_ITEM == notification->getName();
}
@@ -265,31 +266,8 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
offer["from_id"] = notification->getPayload()["from_id"];
offer["from"] = name;
offer["time"] = LLLogChat::timestamp(true);
+ offer["index"] = (LLSD::Integer)session->mMsgs.size();
session->mMsgs.push_front(offer);
LLIMFloater::show(session_id);
}
-
-// static
-void LLHandlerUtil::reloadIMFloaterMessages(
- const LLNotificationPtr& notification)
-{
- LLUUID from_id = notification->getPayload()["from_id"];
- LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id);
- LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>(
- "impanel", session_id);
- if (im_floater != NULL)
- {
- LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession(
- session_id);
- if(session != NULL)
- {
- session->mMsgs.clear();
- std::list<LLSD> chat_history;
- LLLogChat::loadAllHistory(session->mHistoryFileName, chat_history);
- session->addMessagesFromHistory(chat_history);
- }
-
- im_floater->reloadMessages();
- }
-}