diff options
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 30967677e8..960d9e02b2 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -53,6 +53,7 @@ #include "llgroupmgr.h" #include "llnotificationmanager.h" #include "lltransientfloatermgr.h" +#include "llsyswellwindow.h" static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel"); static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well"); @@ -111,6 +112,11 @@ public: mEventTimer.start(); } + void stopFlashing() + { + mEventTimer.stop(); + } + private: callback_t mCallback; S32 mFlashCount; @@ -173,10 +179,18 @@ void LLSysWellChiclet::setCounter(S32 counter) */ mButton->setForcePressedState(counter > 0); - if (mCounter == 0 && counter > 0) + // we have to flash to 'Lit' state each time new unread message is comming. + if (counter > mCounter) { mFlashToLitTimer->flash(); } + else if (counter == 0) + { + // if notification is resolved while well is flashing it can leave in the 'Lit' state + // when flashing finishes itself. Let break flashing here. + mFlashToLitTimer->stopFlashing(); + } + mCounter = counter; } @@ -233,6 +247,10 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); connectCounterUpdatersToSignal("offer"); + + // ensure that notification well window exists, to synchronously + // handle toast add/delete events. + LLNotificationWellWindow::getInstance(); } void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) |