diff options
| author | pepper <3782201+rohvani@users.noreply.github.com> | 2026-09-21 17:15:59 -0400 |
|---|---|---|
| committer | pepper <3782201+rohvani@users.noreply.github.com> | 2026-09-23 15:24:01 -0400 |
| commit | 0803c304ced468abb761b48f6fecdda6e529ac41 (patch) | |
| tree | 826f90671c5c502549184baf2ad520e3faaba8bd | |
| parent | e48a615aa0ff9848ce45caef8974313d92a05b2e (diff) | |
Reuse existing loading indicator state
Use each loading panel's visibility and the widget's existing draw-time
animation in IM sessions and Preview. Remove duplicate visibility flags
and explicit animation start/stop calls.
| -rw-r--r-- | indra/newview/llfloaterconversationpreview.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/llfloaterconversationpreview.h | 1 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsession.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsession.h | 2 |
4 files changed, 4 insertions, 37 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 4f39b65371..d5aa3c3dda 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -35,7 +35,6 @@ #include "llspinctrl.h" #include "lltrans.h" #include "llnotificationsutil.h" -#include "llloadingindicator.h" #include "workqueue.h" const std::string LL_FCP_COMPLETE_NAME("complete_name"); @@ -57,7 +56,6 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i mHistoryThreadsBusy(false), mIsGroup(false), mIsP2P(false), - mLoadingIndicatorVisible(false), mServiceToken(0), mOpened(false) { @@ -159,21 +157,8 @@ void LLFloaterConversationPreview::draw() const bool loading = mIsP2P && (mServiceHistory.isLoading() || LLChatServiceHistory::getSnapshot(mParticipantID).service_work_active); - if (loading != mLoadingIndicatorVisible) - { - mLoadingIndicatorVisible = loading; - getChildView("chat_service_loading")->setVisible(loading); - LLLoadingIndicator* indicator = - getChild<LLLoadingIndicator>("chat_service_loading_wheel"); - if (loading) - { - indicator->start(); - } - else - { - indicator->stop(); - } - } + // The widget animates in draw(); hiding its panel suspends that work. + getChildView("chat_service_loading")->setVisible(loading); if(mShowHistory) { diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index d1228d3332..a4304702ff 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -76,7 +76,6 @@ private: bool mOpened; bool mIsGroup; bool mIsP2P; - bool mLoadingIndicatorVisible; // Fence legacy completions across close, reopen, and deletion. U64 mServiceToken; diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 4b9e63ae5a..6fd6dbee9d 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -52,7 +52,6 @@ #include "lltrans.h" #include "llchathistory.h" #include "llchatservicehistory.h" -#include "llloadingindicator.h" #include "llnotifications.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -83,7 +82,6 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id) mTypingTimeoutTimer(), mPositioned(false), mSessionInitialized(false), - mChatServiceLoadingVisible(false), mMeTypingTimer(), mOtherTypingTimer() { @@ -1131,21 +1129,8 @@ void LLFloaterIMSession::draw() (mSession->isChatHistoryLoading() || LLChatServiceHistory::getSnapshot(mSession->mOtherParticipantID).service_work_active); - if (loading != mChatServiceLoadingVisible) - { - mChatServiceLoadingVisible = loading; - getChildView("chat_service_loading")->setVisible(loading); - LLLoadingIndicator* indicator = - getChild<LLLoadingIndicator>("chat_service_loading_wheel"); - if (loading) - { - indicator->start(); - } - else - { - indicator->stop(); - } - } + // The widget animates in draw(); hiding its panel suspends that work. + getChildView("chat_service_loading")->setVisible(loading); // add people who were added via dropPerson() if (!mPendingParticipants.empty()) diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 01147f1311..a35fc27791 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -190,8 +190,6 @@ private: bool mSessionInitialized; - // Cache the rendered state so draw() starts or stops the loading indicator only on transitions. - bool mChatServiceLoadingVisible; LLSD mQueuedMsgsForInit; uuid_vec_t mInvitedParticipants; |
