From 1da5e7d1f7f7ba0f023f19bf814957f894f21c25 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 23 Feb 2022 11:21:40 +0300 Subject: [PATCH] Added ability to chose copyright as reason for message report. --- Telegram/Resources/langs/lang.strings | 1 + Telegram/SourceFiles/history/view/history_view_context_menu.cpp | 1 + Telegram/SourceFiles/ui/boxes/report_box.cpp | 1 + Telegram/SourceFiles/ui/boxes/report_box.h | 1 + 4 files changed, 4 insertions(+) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index d5c808c223..e592dc9354 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1109,6 +1109,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_report_reason_violence" = "Violence"; "lng_report_reason_child_abuse" = "Child Abuse"; "lng_report_reason_pornography" = "Pornography"; +"lng_report_reason_copyright" = "Copyright"; "lng_report_reason_illegal_drugs" = "Illegal Drugs"; "lng_report_reason_personal_details" = "Personal Details"; "lng_report_reason_other" = "Other"; diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index b34a8573cb..f4c8f2bd92 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -1232,6 +1232,7 @@ void SendReport( case Reason::Violence: return MTP_inputReportReasonViolence(); case Reason::ChildAbuse: return MTP_inputReportReasonChildAbuse(); case Reason::Pornography: return MTP_inputReportReasonPornography(); + case Reason::Copyright: return MTP_inputReportReasonCopyright(); case Reason::IllegalDrugs: return MTP_inputReportReasonIllegalDrugs(); case Reason::PersonalDetails: diff --git a/Telegram/SourceFiles/ui/boxes/report_box.cpp b/Telegram/SourceFiles/ui/boxes/report_box.cpp index 7c52734f2b..a03f1314cb 100644 --- a/Telegram/SourceFiles/ui/boxes/report_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/report_box.cpp @@ -54,6 +54,7 @@ void ReportReasonBox( add(Reason::Violence, tr::lng_report_reason_violence); add(Reason::ChildAbuse, tr::lng_report_reason_child_abuse); add(Reason::Pornography, tr::lng_report_reason_pornography); + add(Reason::Copyright, tr::lng_report_reason_copyright); if (source == Source::Message) { add(Reason::IllegalDrugs, tr::lng_report_reason_illegal_drugs); add(Reason::PersonalDetails, tr::lng_report_reason_personal_details); diff --git a/Telegram/SourceFiles/ui/boxes/report_box.h b/Telegram/SourceFiles/ui/boxes/report_box.h index 73089da8f9..bc4ddbd35c 100644 --- a/Telegram/SourceFiles/ui/boxes/report_box.h +++ b/Telegram/SourceFiles/ui/boxes/report_box.h @@ -24,6 +24,7 @@ enum class ReportReason { Violence, ChildAbuse, Pornography, + Copyright, IllegalDrugs, PersonalDetails, Other,