2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Support arbitrary content in toasts.

This commit is contained in:
John Preston
2024-08-09 12:25:58 +02:00
parent ac92e1c99e
commit e89f2b55e8
23 changed files with 37 additions and 60 deletions

View File

@@ -1395,10 +1395,6 @@ void ShowPremiumPromoToast(
const auto toast = std::make_shared<WeakToast>();
(*toast) = show->showToast({
.text = std::move(textWithLink),
.st = &st::defaultMultilineToast,
.duration = Ui::Toast::kDefaultDuration * 2,
.adaptive = true,
.multiline = true,
.filter = crl::guard(&show->session(), [=](
const ClickHandlerPtr &,
Qt::MouseButton button) {
@@ -1416,6 +1412,8 @@ void ShowPremiumPromoToast(
}
return false;
}),
.adaptive = true,
.duration = Ui::Toast::kDefaultDuration * 2,
});
}