summaryrefslogtreecommitdiff
path: root/indra/newview/llblocklist.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-06-13 14:20:22 +0800
committerErik Kundiman <erik@megapahit.org>2026-06-13 17:44:11 +0800
commit191669d38d232d2bd61a0dd2252c7a3543a2b467 (patch)
treec1783f307fd217f38b31cebbe830ba0481925f8a /indra/newview/llblocklist.cpp
parent47b583e9caa3388cd41f70e8de0a5a950082979d (diff)
parent663bf4d3eba16e1d0a781ac5261541e7e2d6b4f2 (diff)
Merge tag 'Second_Life_Release#663bf4d3-26.3' into 26.3
Diffstat (limited to 'indra/newview/llblocklist.cpp')
-rw-r--r--indra/newview/llblocklist.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 89516a8a84..05c882e3f1 100644
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -48,6 +48,7 @@ LLBlockList::LLBlockList(const Params& p)
LLMuteList::getInstance()->addObserver(this);
mMuteListSize = static_cast<U32>(LLMuteList::getInstance()->getMutes().size());
+ updateNoItemsCommentText();
// Set up context menu.
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -101,8 +102,35 @@ BlockListActionType LLBlockList::getCurrentMuteListActionType()
return type;
}
+void LLBlockList::updateNoItemsCommentText()
+{
+ const LLMuteList* mute_list = LLMuteList::getInstance();
+ if (!mute_list->isLoaded() && !mute_list->isFailed())
+ {
+ setNoItemsCommentText(mLoadingItemsMsg);
+ }
+ else if (mute_list->isFailed())
+ {
+ setNoItemsCommentText(mFailedItemsMsg);
+ }
+ else
+ {
+ updateNoItemsMessage(mNameFilter);
+ }
+}
+
+void LLBlockList::onChange()
+{
+ // Something changed, not sure what so force a refresh.
+ mShouldAddAll = true;
+ mActionType = NONE;
+ updateNoItemsCommentText();
+ setDirty();
+}
+
void LLBlockList::onChangeDetailed(const LLMute &mute)
{
+ updateNoItemsCommentText();
mActionType = getCurrentMuteListActionType();
mCurItemId = mute.mID;
@@ -197,6 +225,7 @@ void LLBlockList::addNewItem(const LLMute* mute)
void LLBlockList::refresh()
{
+ updateNoItemsCommentText();
bool have_filter = !mNameFilter.empty();
// save selection to restore it after list rebuilt
@@ -208,6 +237,8 @@ void LLBlockList::refresh()
clear();
createList();
mShouldAddAll = false;
+ // Full rebuild supersedes any queued incremental action. This ensures list consistency.
+ mActionType = NONE;
}
else
{
@@ -246,7 +277,9 @@ void LLBlockList::refresh()
{
LLBlockedListItem * curItem = dynamic_cast<LLBlockedListItem *> (*it);
if(curItem)
- {
+ {
+ // Refresh item text styling each pass so filtering keeps highlight in sync.
+ curItem->highlightName(mNameFilter);
hideListItem(curItem, findInsensitive(curItem->getName(), mNameFilter));
}
}