From 59c66d1f49d50b3f9d4b8e865a3dcb5c0ebb5555 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 7 Mar 2023 08:42:11 +0300 Subject: [PATCH] Fixed showing of multiline toast from comments button. --- .../SourceFiles/history/view/history_view_message.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 221e0e705..a3aa5e99c 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/effects/reaction_fly_animation.h" #include "ui/chat/message_bubble.h" #include "ui/chat/chat_style.h" -#include "ui/toast/toast.h" +#include "ui/toasts/common_toasts.h" #include "ui/text/text_utilities.h" #include "ui/text/text_entity.h" #include "ui/cached_round_corners.h" @@ -2036,9 +2036,11 @@ ClickHandlerPtr Message::createGoToCommentsLink() const { const auto history = item->history(); if (const auto channel = history->peer->asChannel()) { if (channel->invitePeekExpires()) { - Ui::Toast::Show( - Window::Show(controller).toastParent(), - tr::lng_channel_invite_private(tr::now)); + const auto show = Window::Show(controller); + Ui::ShowMultilineToast({ + .parentOverride = show.toastParent(), + .text = { tr::lng_channel_invite_private(tr::now) }, + }); return; } }