diff options
| author | Darl <me@darl.cat> | 2026-04-02 11:27:48 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-04-07 20:48:52 +0300 |
| commit | 0abb59a959d16b1163076ff0bd804d59ccf57bdb (patch) | |
| tree | f86c2ad6b96da36528d1e97d13ed43fb974b9798 | |
| parent | 03c13540cb38d2e0ada6bf62ad2d4666487fa090 (diff) | |
Rename LLMuteList state machine touch points for clarity
getLoadFailed -> updateLoadState
- No longer labeled as a plain getter, but instead as a state machine advancement point
- This name reflects its role in advancing the state according to design parameters when called from the idle loop
- Call site in LLIMProcessing::requestOfflineMessages simplified by internalizing our readiness checks
isFailed
- Reintroduced const to match isLoaded for determining state
Signed-off-by: Darl <me@darl.cat>
| -rw-r--r-- | indra/newview/llimprocessing.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llmutelist.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llmutelist.h | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index b1e42e11fb..3f60dc5d26 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1534,7 +1534,7 @@ void LLIMProcessing::requestOfflineMessages() && isAgentAvatarValid() && gAgent.getRegion() && gAgent.getRegion()->capabilitiesReceived() - && (LLMuteList::getInstance()->isLoaded() || LLMuteList::getInstance()->getLoadFailed())) + && LLMuteList::getInstance()->updateLoadState()) { std::string cap_url = gAgent.getRegionCapability("ReadOfflineMsgs"); diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 154e826196..02a5a43c6b 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -214,9 +214,9 @@ bool LLMuteList::isLinden(const std::string& name) return last_name == "linden"; } -bool LLMuteList::getLoadFailed() +bool LLMuteList::updateLoadState() { - if (mLoadState == ML_FAILED) + if (isLoaded() || isFailed()) { return true; } @@ -227,7 +227,7 @@ bool LLMuteList::getLoadFailed() { LL_WARNS() << "Mute list request timed out; trying cache fallback once" << LL_ENDL; tryLoadCacheFallback(gAgent.getID(), "request timeout"); - return mLoadState == ML_FAILED; + return isLoaded() || isFailed(); } } return false; diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 34857e2006..ff010a02e8 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -125,7 +125,11 @@ public: static bool isLinden(const std::string& name); bool isLoaded() const { return mLoadState == ML_LOADED; } - bool getLoadFailed(); + bool isFailed() const { return mLoadState == ML_FAILED; } + + // Advance the load state machine, trying cache fallback if necessary. + // Return value indicates mute list consumption readiness. + bool updateLoadState(); std::vector<LLMute> getMutes() const; |
