summaryrefslogtreecommitdiff
path: root/indra/newview/llblocklist.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-08-18 13:57:14 +0800
committerErik Kundiman <erik@megapahit.org>2026-08-18 13:57:14 +0800
commit2fa8281b2d8ce8bdbcacf139ec674480da6c9d81 (patch)
treeffb343fee97f21942123fd322d88fea3ef1a4811 /indra/newview/llblocklist.cpp
parent742d802f073e81abc6d4cd512e58a4d03b414b83 (diff)
parent214fa765986b4c1e1de1b917581f8508278abd8e (diff)
Merge branch '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));
}
}