diff options
| author | Alexei Arabadji <aarabadji@productengine.com> | 2010-05-13 18:49:20 +0300 |
|---|---|---|
| committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-05-13 18:49:20 +0300 |
| commit | 90940d0b065d18b1dfaa178ee294b4d47ff96e2a (patch) | |
| tree | 22d3cf9504e4e699d192f1ecc98248219f63f822 /indra/newview/llimfloater.cpp | |
| parent | 966a6efe852a86bc4705c8adf54845eabf7951fa (diff) | |
EXT-7120 ADDITIONAL COMMIT Avoided unnecessary usage of LLNotificationFunctorRegistration for "ConfirmLeaveCall" notification.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/374/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index d25aa37e16..3aa9d75bc0 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -1104,6 +1104,21 @@ void LLIMFloater::closeHiddenIMToasts() channel->closeHiddenToasts(IMToastMatcher()); } } +// static +void LLIMFloater::confirmLeaveCallCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + const LLSD& payload = notification["payload"]; + LLUUID session_id = payload["session_id"]; + + LLFloater* im_floater = LLFloaterReg::findInstance("impanel", session_id); + if (option == 0 && im_floater != NULL) + { + im_floater->closeFloater(); + } + + return; +} // static bool LLIMFloater::isChatMultiTab() @@ -1176,7 +1191,7 @@ void LLIMFloater::onClickCloseBtn() { LLSD payload; payload["session_id"] = mSessionID; - LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload); + LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload, confirmLeaveCallCallback); return; } |
