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:
@@ -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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -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()),
|
||||
|
Reference in New Issue
Block a user