2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -2266,7 +2266,6 @@ ClickHandlerPtr MediaDice::MakeHandler(
.text = { tr::lng_about_random(tr::now, lt_emoji, emoji) },
.st = &st::historyDiceToast,
.duration = Ui::Toast::kDefaultDuration * 2,
.multiline = true,
};
if (CanSend(history->peer, ChatRestriction::SendOther)) {
auto link = Ui::Text::Link(tr::lng_about_random_send(tr::now));
@@ -2295,7 +2294,7 @@ ClickHandlerPtr MediaDice::MakeHandler(
if (const auto strong = weak.get()) {
ShownToast = strong->showToast(std::move(config));
} else {
ShownToast = Ui::Toast::Show(config);
ShownToast = Ui::Toast::Show(std::move(config));
}
});
}

View File

@@ -96,8 +96,8 @@ void MaybeShowPremiumToast(
};
show->showToast({
.text = std::move(text),
.duration = kPremiumToastDuration,
.filter = filter,
.duration = kPremiumToastDuration,
});
}
@@ -398,7 +398,6 @@ void Stickers::applyArchivedResult(
Ui::Toast::Show(Ui::Toast::Config{
.text = { tr::lng_stickers_packs_archived(tr::now) },
.st = &st::stickersToast,
.multiline = true,
});
//Ui::show(
// Box<StickersBox>(archived, &session()),