Skip to content
Snippets Groups Projects
Commit d1898ef3 authored by AlexanderP ProductEngine's avatar AlexanderP ProductEngine
Browse files

CHUI-605 : Fixed : Keep conversation log requires restart to change...

CHUI-605 : Fixed : Keep conversation log requires restart to change preference: connected LLConversationLog::enableLogging() as listener to "LogInstantMessages" control changes
parent f26f9274
No related branches found
No related tags found
No related merge requests found
......@@ -187,16 +187,23 @@ void LLConversationLogFriendObserver::changed(U32 mask)
LLConversationLog::LLConversationLog()
{
LLControlVariable* ctrl = gSavedPerAccountSettings.getControl("LogInstantMessages").get();
if (ctrl)
{
ctrl->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
if (ctrl->getValue().asBoolean()
&& gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
LLControlVariable* log_instant_message = gSavedPerAccountSettings.getControl("LogInstantMessages").get();
LLControlVariable* keep_convers_log = gSavedSettings.getControl("KeepConversationLogTranscripts").get();
bool is_log_message = false;
bool is_keep_log = false;
if (log_instant_message)
{
enableLogging(true);
log_instant_message->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
is_log_message = log_instant_message->getValue().asBoolean();
}
if (keep_convers_log)
{
keep_convers_log->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
is_keep_log = keep_convers_log->getValue().asBoolean();
}
enableLogging(is_log_message && is_keep_log);
}
void LLConversationLog::enableLogging(bool enable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment