2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Don't pass redundant MTPUpdates arguments.

This commit is contained in:
John Preston
2022-08-05 13:37:30 +03:00
parent d891a5344a
commit b7cc2e9894
8 changed files with 78 additions and 60 deletions

View File

@@ -723,20 +723,19 @@ void EditCaptionBox::save() {
return;
}
const auto done = crl::guard(this, [=](const MTPUpdates &updates) {
const auto done = crl::guard(this, [=] {
_saveRequestId = 0;
closeBox();
});
const auto fail = crl::guard(this, [=](const MTP::Error &error) {
const auto fail = crl::guard(this, [=](const QString &error) {
_saveRequestId = 0;
const auto &type = error.type();
if (ranges::contains(Api::kDefaultEditMessagesErrors, type)) {
if (ranges::contains(Api::kDefaultEditMessagesErrors, error)) {
_error = tr::lng_edit_error(tr::now);
update();
} else if (type == u"MESSAGE_NOT_MODIFIED"_q) {
} else if (error == u"MESSAGE_NOT_MODIFIED"_q) {
closeBox();
} else if (type == u"MESSAGE_EMPTY"_q) {
} else if (error == u"MESSAGE_EMPTY"_q) {
_field->setFocus();
_field->showError();
update();