summaryrefslogtreecommitdiff
path: root/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-08-19 18:43:46 +0000
committerJames Cook <james@lindenlab.com>2009-08-19 18:43:46 +0000
commit6bcf7a6fe64457ad5f1dc2939820e45182476842 (patch)
tree5764c94eaea908cbf347acdb1c6207b5b03a1a61 /indra/newview/llimpanel.cpp
parentb4f174f9188e18ab66e0246ebd0bcf68fba9f067 (diff)
EXT-592 IM chat is not updated for the first text message. PE added LLIMFloater::toggle() to show and hide the IM window when chiclets were clicked. This was not invoking the custom logic in LLIMFloater::show() that causes the message list to update. Reviewed with Leyla.
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r--indra/newview/llimpanel.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 65bf1176ff..954da8abd7 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -2232,9 +2232,22 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
}
//static
-BOOL LLIMFloater::toggle(const LLUUID& session_id)
+bool LLIMFloater::toggle(const LLUUID& session_id)
{
- return LLFloaterReg::toggleInstance("impanel", session_id);
+ LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id);
+ if (floater && floater->getVisible())
+ {
+ // clicking on chiclet to close floater just hides it to maintain existing
+ // scroll/text entry state
+ floater->setVisible(false);
+ return false;
+ }
+ else
+ {
+ // ensure the list of messages is updated when floater is made visible
+ show(session_id);
+ return true;
+ }
}
void LLIMFloater::updateMessages()