summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-17 22:14:26 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-17 22:14:26 +0300
commit9373f64f49ad9d0676731041466d353274ee51bd (patch)
tree90eea11c7b8403e991811cca07a0579b6d24c6e6 /indra/newview/llfloaterreporter.cpp
parentd2e242ab632a051e0b357efa1fdd0a1a64027f44 (diff)
SL-3007 Small improvements for auto filling abuse reports
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rw-r--r--indra/newview/llfloaterreporter.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 1c10bf3ca3..2df4ca973d 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -663,7 +663,17 @@ void LLFloaterReporter::showFromAvatar(const LLUUID& avatar_id, const std::strin
void LLFloaterReporter::showFromChat(const LLUUID& avatar_id, const std::string& avatar_name, const std::string& time, const std::string& description)
{
show(avatar_id, avatar_name);
- setDescription(time + "\n" + description);
+
+ LLStringUtil::format_map_t args;
+ args["[MSG_TIME]"] = time;
+ args["[MSG_DESCRIPTION]"] = description;
+
+ LLFloaterReporter *self = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
+ if (self)
+ {
+ std::string description = self->getString("chat_report_format", args);
+ self->getChild<LLUICtrl>("details_edit")->setValue(description);
+ }
}
void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
@@ -1033,13 +1043,3 @@ void LLFloaterReporter::onClose(bool app_quitting)
mSnapshotTimer.stop();
gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", app_quitting);
}
-
-// static
-void LLFloaterReporter::setDescription(const std::string& description)
-{
- LLFloaterReporter *self = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");
- if (self)
- {
- self->getChild<LLUICtrl>("details_edit")->setValue(description);
- }
-}