From b34e3a1b40fd72b4c4cdc1553c3f5934e9e9cef5 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Tue, 18 Dec 2012 18:30:14 +0200
Subject: [PATCH] Clean up: Removed unnecessary call
 removeConversationListItem() when floater closes (If session's floater will
 be removed for any reason, then will start a removing of the corresponding
 session and removeConversationListItem() will call from a session's
 observer); Local variable are renamed in accordance with the code styling

---
 indra/newview/llfloaterimcontainer.cpp  |  7 ++++---
 indra/newview/llfloaterimsessiontab.cpp | 13 -------------
 indra/newview/llfloaterimsessiontab.h   |  1 -
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index ba5ec363d63..390eec84f69 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1412,17 +1412,18 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
 	// 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;
+	bool is_widget_selected = false;
 	LLFolderViewItem* new_selection = NULL;
 	LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid);
 	if (widget)
 	{
-		isWidgetSelected = widget->isSelected();
+		is_widget_selected = widget->isSelected();
 		new_selection = mConversationsRoot->getNextFromChild(widget);
 		if(new_selection == NULL)
 		{
 			new_selection = mConversationsRoot->getPreviousFromChild(widget);
 		}
+
 		widget->destroyView();
 	}
 	
@@ -1445,7 +1446,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
 			}
 		}
 	}
-	return isWidgetSelected;
+	return is_widget_selected;
 }
 
 LLConversationViewSession* LLFloaterIMContainer::createConversationItemWidget(LLConversationItem* item)
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index d6955f37f2a..7984034ded2 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -748,19 +748,6 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key)
 	}
 }
 
-// virtual
-void LLFloaterIMSessionTab::onClose(bool app_quitting)
-{
-	// Always suppress the IM from the conversations list on close if present for any reason
-	if (LLFloaterIMSessionTab::isChatMultiTab())
-	{
-		LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance();
-		if (im_box)
-		{
-            im_box->removeConversationListItem(mKey);
-        }
-    }
-}
 
 void LLFloaterIMSessionTab::onTearOffClicked()
 {
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index a452c77224e..0fa99a46bea 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -77,7 +77,6 @@ class LLFloaterIMSessionTab
 
 	// LLFloater overrides
 	/*virtual*/ void onOpen(const LLSD& key);
-	/*virtual*/ void onClose(bool app_quitting);
 	/*virtual*/ BOOL postBuild();
 	/*virtual*/ void draw();
 	/*virtual*/ void setVisible(BOOL visible);
-- 
GitLab