From 2fddeb478b2778184dbd00f00ef48c12979a3267 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Mar 2021 20:49:32 +0400 Subject: [PATCH] Fix long texts in invite link error toasts. --- Telegram/SourceFiles/window/window_session_controller.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 0cfbd4007..998be1e8a 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -151,7 +151,9 @@ void SessionNavigation::resolveChannelById( return; } const auto fail = [=] { - Ui::Toast::Show(tr::lng_error_post_link_invalid(tr::now)); + Ui::ShowMultilineToast({ + .text = { tr::lng_error_post_link_invalid(tr::now) } + }); }; _session->api().request(base::take(_resolveRequestId)).cancel(); _resolveRequestId = _session->api().request(MTPchannels_GetChannels( @@ -185,7 +187,9 @@ void SessionNavigation::showPeerByLinkResolved( if (const auto call = peer->groupCall()) { parentController()->startOrJoinGroupCall(peer, hash); } else { - Ui::Toast::Show(tr::lng_error_post_link_invalid(tr::now)); + Ui::ShowMultilineToast({ + .text = { tr::lng_group_invite_bad_link(tr::now) } + }); } }).send(); return;