mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Replaced Ui::InformBox and Ui::ConfirmBox with GenericBox.
This commit is contained in:
@@ -466,17 +466,18 @@ void ApiWrap::sendMessageFail(
|
||||
uint64 randomId,
|
||||
FullMsgId itemId) {
|
||||
if (error.type() == qstr("PEER_FLOOD")) {
|
||||
Ui::show(Box<Ui::InformBox>(
|
||||
Ui::show(Ui::MakeInformBox(
|
||||
PeerFloodErrorText(&session(), PeerFloodType::Send)));
|
||||
} else if (error.type() == qstr("USER_BANNED_IN_CHANNEL")) {
|
||||
const auto link = Ui::Text::Link(
|
||||
tr::lng_cant_more_info(tr::now),
|
||||
session().createInternalLinkFull(qsl("spambot")));
|
||||
Ui::show(Box<Ui::InformBox>(tr::lng_error_public_groups_denied(
|
||||
tr::now,
|
||||
lt_more_info,
|
||||
link,
|
||||
Ui::Text::WithEntities)));
|
||||
Ui::show(Ui::MakeInformBox(
|
||||
tr::lng_error_public_groups_denied(
|
||||
tr::now,
|
||||
lt_more_info,
|
||||
link,
|
||||
Ui::Text::WithEntities)));
|
||||
} else if (error.type().startsWith(qstr("SLOWMODE_WAIT_"))) {
|
||||
const auto chop = qstr("SLOWMODE_WAIT_").size();
|
||||
const auto left = base::StringViewMid(error.type(), chop).toInt();
|
||||
@@ -494,7 +495,7 @@ void ApiWrap::sendMessageFail(
|
||||
Assert(peer->isUser());
|
||||
if (const auto item = scheduled.lookupItem(peer->id, itemId.msg)) {
|
||||
scheduled.removeSending(item);
|
||||
Ui::show(Box<Ui::InformBox>(tr::lng_cant_do_this(tr::now)));
|
||||
Ui::show(Ui::MakeInformBox(tr::lng_cant_do_this()));
|
||||
}
|
||||
} else if (error.type() == qstr("CHAT_FORWARDS_RESTRICTED")) {
|
||||
Ui::ShowMultilineToast({ .text = { peer->isBroadcast()
|
||||
@@ -1275,7 +1276,7 @@ void ApiWrap::migrateDone(
|
||||
|
||||
void ApiWrap::migrateFail(not_null<PeerData*> peer, const QString &error) {
|
||||
if (error == u"CHANNELS_TOO_MUCH"_q) {
|
||||
Ui::show(Box<Ui::InformBox>(tr::lng_migrate_error(tr::now)));
|
||||
Ui::show(Ui::MakeInformBox(tr::lng_migrate_error()));
|
||||
}
|
||||
if (auto handlers = _migrateCallbacks.take(peer)) {
|
||||
for (auto &handler : *handlers) {
|
||||
|
Reference in New Issue
Block a user