Skip to content
Snippets Groups Projects
Commit 377a9ab9 authored by Paul ProductEngine's avatar Paul ProductEngine
Browse files

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

- Got rid of confusing conditions.
parent 1b1ad93c
No related branches found
No related tags found
No related merge requests found
...@@ -111,14 +111,7 @@ BOOL LLNearbyChatBar::postBuild() ...@@ -111,14 +111,7 @@ BOOL LLNearbyChatBar::postBuild()
gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); 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, mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility"));
// 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"));
}
// Register for font change notifications // Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
...@@ -152,18 +145,6 @@ bool LLNearbyChatBar::applyRectControl() ...@@ -152,18 +145,6 @@ bool LLNearbyChatBar::applyRectControl()
return rect_controlled; 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) void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
{ {
// Update things with the new font whohoo // Update things with the new font whohoo
...@@ -437,7 +418,7 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() ...@@ -437,7 +418,7 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
storeRectControl(); storeRectControl();
} }
saveChatHistoryVisibility(); gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible());
} }
void LLNearbyChatBar::setMinimized(BOOL b) void LLNearbyChatBar::setMinimized(BOOL b)
......
...@@ -92,11 +92,6 @@ class LLNearbyChatBar : public LLFloater ...@@ -92,11 +92,6 @@ class LLNearbyChatBar : public LLFloater
LLLocalSpeakerMgr* mSpeakerMgr; LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight; S32 mExpandedHeight;
private:
// Saves visibility of chat history panel
// if save_visibility="true"
void saveChatHistoryVisibility();
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment