diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index d1e37134711c9af9aa0809fff600815c6a7f827a..8f1dec14319e4d00b07c57e41648bd3863f4bb1e 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -228,13 +228,23 @@ bool	LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
 	return false;
 }
 
-void	LLNearbyChat::onOpen(const LLSD& key )
+void	LLNearbyChat::setVisible(BOOL visible)
 {
-	LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
-	if(chat_channel)
+	if(visible)
 	{
-		chat_channel->removeToastsFromChannel();
+		LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+		if(chat_channel)
+		{
+			chat_channel->removeToastsFromChannel();
+		}
 	}
+
+	LLDockableFloater::setVisible(visible);
+}
+
+void	LLNearbyChat::onOpen(const LLSD& key )
+{
+	LLDockableFloater::onOpen(key);
 }
 
 void LLNearbyChat::setRect	(const LLRect &rect)
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 561c2d3677699f16b2c272d933cc0c1d2cc51b92..efcaf4263b1c225a132b4e0885e63a5e80dfdc62 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -53,6 +53,8 @@ class LLNearbyChat: public LLDockableFloater
 
 	/*virtual*/ void	onOpen	(const LLSD& key);
 
+	/*virtual*/ void	setVisible(BOOL visible);
+
 	virtual void setRect		(const LLRect &rect);
 
 private: