Paul ProductEngine avatar Paul ProductEngine committed 33ef18c

EXP-1586 ADDITIONAL FIX (Nearby chat window no longer persists between viewer startups)

- Got rid of confusing conditions.

Comments (0)

Files changed (2)

indra/newview/llnearbychatbar.cpp

 
 	gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE);
 
-	// If mVisibilityControl is not empty it means that the visibility state of floater is saved between sessions,
-	// i.e. save_visibility="true" for this floater.
-	// So if we need to restore visibility state of floater we also need to restore visibility state of nearby chat history.
-	if (!mVisibilityControl.empty())
-	{
-		// restore visibility of nearby chat history
-		mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility"));
-	}
+	mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility"));
 
 	// Register for font change notifications
 	LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
 	return rect_controlled;
 }
 
-void LLNearbyChatBar::saveChatHistoryVisibility()
-{
-	// save visibility state of nearby chat history panel if
-	// visibility of nearby chat floater is saved, i.e. save_visisbility="true"
-	// (if save_visisbility="true", mVisibilityControl == "floater_vis_chat_bar")
-	if (mVisibilityControl.size() > 1)
-	{
-		// save visibility of nearby chat history
-		gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible());
-	}
-}
-
 void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
 {
 	// Update things with the new font whohoo
 		storeRectControl();
 	}
 
-	saveChatHistoryVisibility();
+	gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible());
 }
 
 void LLNearbyChatBar::setMinimized(BOOL b)

indra/newview/llnearbychatbar.h

 	LLLocalSpeakerMgr*		mSpeakerMgr;
 
 	S32 mExpandedHeight;
-private:
-
-	// Saves visibility of chat history panel
-	// if save_visibility="true"
-	void saveChatHistoryVisibility();
 };
 
 #endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.