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

@@ -167,7 +167,6 @@ void AntiSpamValidator::addAction(
channel = _channel] {
window->showToast({
.text = text,
.duration = ApiWrap::kJoinErrorDuration,
.filter = [=](
const ClickHandlerPtr&,
Qt::MouseButton) {
@@ -177,6 +176,7 @@ void AntiSpamValidator::addAction(
ParticipantsRole::Admins);
return true;
},
.duration = ApiWrap::kJoinErrorDuration,
});
};
menu->addAction(

View File

@@ -106,8 +106,8 @@ void AddAction(
tr::lng_mediaview_downloads(tr::now),
"internal:show_saved_message"),
Ui::Text::WithEntities),
.st = &st::defaultToast,
.filter = filter,
.st = &st::defaultToast,
});
};