Fixed showing of multiline toast from comments button.

This commit is contained in:
23rd 2023-03-07 08:42:11 +03:00
parent 728ec0974a
commit 59c66d1f49

View file

@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/reaction_fly_animation.h" #include "ui/effects/reaction_fly_animation.h"
#include "ui/chat/message_bubble.h" #include "ui/chat/message_bubble.h"
#include "ui/chat/chat_style.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_utilities.h"
#include "ui/text/text_entity.h" #include "ui/text/text_entity.h"
#include "ui/cached_round_corners.h" #include "ui/cached_round_corners.h"
@ -2036,9 +2036,11 @@ ClickHandlerPtr Message::createGoToCommentsLink() const {
const auto history = item->history(); const auto history = item->history();
if (const auto channel = history->peer->asChannel()) { if (const auto channel = history->peer->asChannel()) {
if (channel->invitePeekExpires()) { if (channel->invitePeekExpires()) {
Ui::Toast::Show( const auto show = Window::Show(controller);
Window::Show(controller).toastParent(), Ui::ShowMultilineToast({
tr::lng_channel_invite_private(tr::now)); .parentOverride = show.toastParent(),
.text = { tr::lng_channel_invite_private(tr::now) },
});
return; return;
} }
} }