mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Support two new message report reasons.
This commit is contained in:
parent
e962036889
commit
9d200017c3
4 changed files with 12 additions and 0 deletions
|
@ -1109,6 +1109,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_report_reason_violence" = "Violence";
|
"lng_report_reason_violence" = "Violence";
|
||||||
"lng_report_reason_child_abuse" = "Child Abuse";
|
"lng_report_reason_child_abuse" = "Child Abuse";
|
||||||
"lng_report_reason_pornography" = "Pornography";
|
"lng_report_reason_pornography" = "Pornography";
|
||||||
|
"lng_report_reason_illegal_drugs" = "Illegal Drugs";
|
||||||
|
"lng_report_reason_personal_details" = "Personal Details";
|
||||||
"lng_report_reason_other" = "Other";
|
"lng_report_reason_other" = "Other";
|
||||||
"lng_report_reason_description" = "Description";
|
"lng_report_reason_description" = "Description";
|
||||||
"lng_report_button" = "Report";
|
"lng_report_button" = "Report";
|
||||||
|
|
|
@ -1232,6 +1232,10 @@ void SendReport(
|
||||||
case Reason::Violence: return MTP_inputReportReasonViolence();
|
case Reason::Violence: return MTP_inputReportReasonViolence();
|
||||||
case Reason::ChildAbuse: return MTP_inputReportReasonChildAbuse();
|
case Reason::ChildAbuse: return MTP_inputReportReasonChildAbuse();
|
||||||
case Reason::Pornography: return MTP_inputReportReasonPornography();
|
case Reason::Pornography: return MTP_inputReportReasonPornography();
|
||||||
|
case Reason::IllegalDrugs:
|
||||||
|
return MTP_inputReportReasonIllegalDrugs();
|
||||||
|
case Reason::PersonalDetails:
|
||||||
|
return MTP_inputReportReasonPersonalDetails();
|
||||||
case Reason::Other: return MTP_inputReportReasonOther();
|
case Reason::Other: return MTP_inputReportReasonOther();
|
||||||
}
|
}
|
||||||
Unexpected("Bad reason group value.");
|
Unexpected("Bad reason group value.");
|
||||||
|
|
|
@ -54,6 +54,10 @@ void ReportReasonBox(
|
||||||
add(Reason::Violence, tr::lng_report_reason_violence);
|
add(Reason::Violence, tr::lng_report_reason_violence);
|
||||||
add(Reason::ChildAbuse, tr::lng_report_reason_child_abuse);
|
add(Reason::ChildAbuse, tr::lng_report_reason_child_abuse);
|
||||||
add(Reason::Pornography, tr::lng_report_reason_pornography);
|
add(Reason::Pornography, tr::lng_report_reason_pornography);
|
||||||
|
if (source == Source::Message) {
|
||||||
|
add(Reason::IllegalDrugs, tr::lng_report_reason_illegal_drugs);
|
||||||
|
add(Reason::PersonalDetails, tr::lng_report_reason_personal_details);
|
||||||
|
}
|
||||||
add(Reason::Other, tr::lng_report_reason_other);
|
add(Reason::Other, tr::lng_report_reason_other);
|
||||||
|
|
||||||
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||||
|
|
|
@ -24,6 +24,8 @@ enum class ReportReason {
|
||||||
Violence,
|
Violence,
|
||||||
ChildAbuse,
|
ChildAbuse,
|
||||||
Pornography,
|
Pornography,
|
||||||
|
IllegalDrugs,
|
||||||
|
PersonalDetails,
|
||||||
Other,
|
Other,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue