diff options
author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-10-12 20:10:13 +0300 |
---|---|---|
committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-10-12 20:10:13 +0300 |
commit | 19c5b35a86dbe641fe397baf9a8194d78e440af8 (patch) | |
tree | 9cb3d04a691a594ee0b7ccba4a52afa1f314f31b /indra/newview | |
parent | 9aa03f0bf284bbfa3f50883351c6e39f7ffa41c5 (diff) |
CHUI-385 FIXED All user's do not receive ad hoc messages after adding a user to a conversation
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.h | 4 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 9 |
3 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 0f44d42780..2248699e5e 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -109,8 +109,7 @@ void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) { - removeConversationListItem(old_session_id); - addConversationListItem(new_session_id); + addConversationListItem(new_session_id, removeConversationListItem(old_session_id)); } void LLIMFloaterContainer::sessionRemoved(const LLUUID& session_id) @@ -1118,7 +1117,7 @@ void LLIMFloaterContainer::setNearbyDistances() } } -void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) +void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) { bool is_nearby_chat = uuid.isNull(); @@ -1173,7 +1172,10 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) current_participant_model++; } - setConvItemSelect(uuid); + if (isWidgetSelected) + { + setConvItemSelect(uuid); + } // set the widget to minimized mode if conversations pane is collapsed widget->toggleMinimizedMode(mConversationsPane->isCollapsed()); @@ -1181,17 +1183,19 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) return; } -void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus) +bool LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus) { // Delete the widget and the associated conversation item // Note : since the mConversationsItems is also the listener to the widget, deleting // the widget will also delete its listener + bool isWidgetSelected = false; conversations_widgets_map::iterator widget_it = mConversationsWidgets.find(uuid); if (widget_it != mConversationsWidgets.end()) { LLFolderViewItem* widget = widget_it->second; if (widget) { + isWidgetSelected = widget->isSelected(); widget->destroyView(); } } @@ -1211,6 +1215,7 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c widget->selectItem(); } } + return isWidgetSelected; } LLConversationViewSession* LLIMFloaterContainer::createConversationItemWidget(LLConversationItem* item) diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index ceb054dfa3..5c11577154 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -133,8 +133,8 @@ private: // Conversation list implementation public: - void removeConversationListItem(const LLUUID& uuid, bool change_focus = true); - void addConversationListItem(const LLUUID& uuid); + bool removeConversationListItem(const LLUUID& uuid, bool change_focus = true); + void addConversationListItem(const LLUUID& uuid, bool isWidgetSelected = false); void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id); void setNearbyDistances(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a604c884ca..aa5b9ce006 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -643,6 +643,12 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { session->sessionInitReplyReceived(new_session_id); + if (old_session_id != new_session_id) + { + mId2SessionMap.erase(old_session_id); + mId2SessionMap[new_session_id] = session; + } + LLIMFloater* im_floater = LLIMFloater::findInstance(old_session_id); if (im_floater) { @@ -651,9 +657,6 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con if (old_session_id != new_session_id) { - mId2SessionMap.erase(old_session_id); - mId2SessionMap[new_session_id] = session; - gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id); } |