mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user