summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationlog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r--indra/newview/llconversationlog.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 1171b3db41..eb3a3731ee 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -187,16 +187,23 @@ void LLConversationLogFriendObserver::changed(U32 mask)
LLConversationLog::LLConversationLog()
{
- LLControlVariable* ctrl = gSavedPerAccountSettings.getControl("LogInstantMessages").get();
- if (ctrl)
+ 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)
{
- ctrl->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2));
- if (ctrl->getValue().asBoolean()
- && gSavedSettings.getBOOL("KeepConversationLogTranscripts"))
- {
- 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)