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

@@ -243,7 +243,7 @@ void TermsBox::prepare() {
st::termsPadding),
0,
age ? age->height() : 0);
const auto toastParent = Ui::BoxShow(this).toastParent();
const auto show = uiShow();
content->entity()->setClickHandlerFilter([=](
const ClickHandlerPtr &handler,
Qt::MouseButton button) {
@@ -252,8 +252,7 @@ void TermsBox::prepare() {
: QString();
if (TextUtilities::RegExpMention().match(link).hasMatch()) {
_lastClickedMention = link;
Ui::Toast::Show(
toastParent,
show->showToast(
tr::lng_terms_agree_to_proceed(tr::now, lt_bot, link));
return false;
}