diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index c59370f190..f3c2c6fc43 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -2455,6 +2455,8 @@ void Controller::saveTitle() { _controls.title->showError(); if (type == u"NO_CHAT_TITLE"_q) { _box->scrollToWidget(_controls.title); + } else { + _navigation->showToast(type); } cancelSave(); }; @@ -2533,8 +2535,9 @@ void Controller::saveDescription() { MTPstring() // Description. )).done([=] { successCallback(); - }).fail([=] { + }).fail([=](const MTP::Error &error) { _controls.description->showError(); + _navigation->showToast(error.type()); cancelSave(); }).send(); }).fail([=] { @@ -2554,6 +2557,7 @@ void Controller::saveDescription() { return; } _controls.description->showError(); + _navigation->showToast(type); cancelSave(); }).send(); } @@ -2625,9 +2629,11 @@ void Controller::togglePreHistoryHidden( channel->session().api().applyUpdates(result); apply(); }).fail([=](const MTP::Error &error) { - if (error.type() == u"CHAT_NOT_MODIFIED"_q) { + const auto type = error.type(); + if (type == u"CHAT_NOT_MODIFIED"_q) { apply(); } else { + _navigation->showToast(type); fail(); } }).send();