Replaced Ui::InformBox and Ui::ConfirmBox with GenericBox.

This commit is contained in:
23rd
2022-02-27 11:23:20 +03:00
parent d5a44a2ba4
commit 5718789d53
89 changed files with 796 additions and 733 deletions
@@ -564,7 +564,10 @@ void AddBotToGroupBoxController::shareBotGame(not_null<PeerData*> chat) {
return tr::lng_bot_sure_share_game_group(tr::now, lt_group, chat->name);
}();
Ui::show(
Box<Ui::ConfirmBox>(confirmText, std::move(send)),
Ui::MakeConfirmBox({
.text = confirmText,
.confirmed = std::move(send),
}),
Ui::LayerOption::KeepOther);
}
@@ -572,7 +575,7 @@ void AddBotToGroupBoxController::addBotToGroup(not_null<PeerData*> chat) {
if (const auto megagroup = chat->asMegagroup()) {
if (!megagroup->canAddMembers()) {
Ui::show(
Box<Ui::InformBox>(tr::lng_error_cant_add_member(tr::now)),
Ui::MakeInformBox(tr::lng_error_cant_add_member()),
Ui::LayerOption::KeepOther);
return;
}
@@ -582,7 +585,7 @@ void AddBotToGroupBoxController::addBotToGroup(not_null<PeerData*> chat) {
});
auto confirmText = tr::lng_bot_sure_invite(tr::now, lt_group, chat->name);
Ui::show(
Box<Ui::ConfirmBox>(confirmText, send),
Ui::MakeConfirmBox({ confirmText, send }),
Ui::LayerOption::KeepOther);
}