2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-06 01:16:12 +00:00

Detach ComposeControls from SessionController.

This commit is contained in:
John Preston
2023-05-02 13:33:19 +04:00
parent 665467b02d
commit 65afa2c402
178 changed files with 2080 additions and 1869 deletions

View File

@@ -82,7 +82,7 @@ void SendBotCallbackData(
flags |= MTPmessages_GetBotCallbackAnswer::Flag::f_password;
}
const auto weak = base::make_weak(controller);
const auto show = std::make_shared<Window::Show>(controller);
const auto show = controller->uiShow();
button->requestId = api->request(MTPmessages_GetBotCallbackAnswer(
MTP_flags(flags),
history->peer->input,
@@ -119,7 +119,7 @@ void SendBotCallbackData(
if (withPassword) {
show->hideLayer();
}
Ui::Toast::Show(show->toastParent(), message);
show->showToast(message);
}
} else if (!link.isEmpty()) {
if (!isGame) {
@@ -210,7 +210,7 @@ void SendBotCallbackDataWithPassword(
}
api->cloudPassword().reload();
const auto weak = base::make_weak(controller);
const auto show = std::make_shared<Window::Show>(controller);
const auto show = controller->uiShow();
SendBotCallbackData(controller, item, row, column, {}, {}, [=](
const QString &error) {
auto box = PrePasswordErrorBox(