Show user name when deleting all messages from user.

This commit is contained in:
John Preston 2022-02-28 19:45:19 +03:00
parent 38600d8189
commit 71228eae59
3 changed files with 11 additions and 3 deletions

View file

@ -1565,7 +1565,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_in_dlg_poll" = "Poll";
"lng_ban_user" = "Ban User";
"lng_delete_all_from" = "Delete all from this user";
"lng_delete_all_from_user" = "Delete all from {user}";
"lng_report_spam" = "Report Spam";
"lng_report_spam_and_leave" = "Report spam and leave";
"lng_report_spam_done" = "Thank you for your report.";

View file

@ -182,7 +182,11 @@ void DeleteMessagesBox::prepare() {
if (_moderateDeleteAll) {
_deleteAll.create(
this,
tr::lng_delete_all_from(tr::now),
tr::lng_delete_all_from_user(
tr::now,
lt_user,
Ui::Text::Bold(_moderateFrom->name),
Ui::Text::WithEntities),
false,
st::defaultBoxCheckbox);
}

View file

@ -1013,7 +1013,11 @@ void PeerMenuBlockUserBox(
const auto allFromUser = v::is<ClearReply>(suggestClear)
? box->addRow(object_ptr<Ui::Checkbox>(
box,
tr::lng_delete_all_from(tr::now),
tr::lng_delete_all_from_user(
tr::now,
lt_user,
Ui::Text::Bold(peer->name),
Ui::Text::WithEntities),
true,
st::defaultBoxCheckbox))
: nullptr;