summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-01 18:35:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 21:58:53 +0800
commit00bb3bb6f07660bd914d29a1389342bb3060d254 (patch)
tree431f574922494d2201718f13085f17bc6bd7fb42 /indra/newview/llfloaterimcontainer.cpp
parenta8636720129952c10cf49ab80da21bf8b340b96c (diff)
parent4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff)
Merge remote-tracking branch 'secondlife/release/26.4' into 26.4
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index f8f34ca12e..e466090624 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -163,16 +163,24 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const
// Note however that the LLFloaterIMSession has its session id updated through a call to sessionInitReplyReceived()
// and do not need to be deleted and recreated (trying this creates loads of problems). We do need however to suppress
// its related mSessions record as it's indexed with the wrong id.
- // Grabbing the updated LLFloaterIMSession and readding it in mSessions will eventually be done by addConversationListItem().
mSessions.erase(old_session_id);
- // Delete the model and participants related to the old session
- bool change_focus = removeConversationListItem(old_session_id);
+ // Remove the old conversation widget without changing focus - we'll immediately re-add with
+ // the new id and select it, avoiding an unnecessary focus switch to an adjacent conversation.
+ bool was_selected = removeConversationListItem(old_session_id, false);
// Create a new conversation with the new id
- addConversationListItem(new_session_id, change_focus);
+ addConversationListItem(new_session_id, was_selected);
LLFloaterIMSessionTab::addToHost(new_session_id);
+ // addToHost is a no-op for already-hosted floaters, so mSessions won't be
+ // updated by addFloater. Re-register manually so message flash works.
+ LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::findConversation(new_session_id);
+ if (conversp && mSessions.find(new_session_id) == mSessions.end())
+ {
+ mSessions[new_session_id] = conversp;
+ }
+
if (was_active)
{
selectConversationPair(new_session_id, true, false, true);
@@ -2371,7 +2379,7 @@ bool LLFloaterIMContainer::isNearbyChatSpeakerSelected()
if (!selectedItem)
{
LL_WARNS() << "Current selected item is null" << LL_ENDL;
- return NULL;
+ return false;
}
conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin();