From ff3bfd3fba0b2676871980874d5185e49317a505 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 12 Jun 2022 16:51:37 +0400 Subject: [PATCH] Make links in the invoice description clickable. --- Telegram/SourceFiles/payments/ui/payments_form_summary.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp index 489f91cec..3ecfaf4b3 100644 --- a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp @@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/wrap/fade_wrap.h" #include "ui/text/format_values.h" #include "ui/text/text_utilities.h" +#include "ui/text/text_entity.h" #include "countries/countries_instance.h" #include "lang/lang_keys.h" #include "base/unixtime.h" @@ -209,7 +210,6 @@ void FormSummary::setupCover(not_null layout) { FlatLabel *description = nullptr; FlatLabel *seller = nullptr; }; - const auto cover = layout->add(object_ptr(layout)); const auto state = cover->lifetime().make_state(); state->title = CreateChild( @@ -218,7 +218,9 @@ void FormSummary::setupCover(not_null layout) { st::paymentsTitle); state->description = CreateChild( cover, - _invoice.cover.description, + rpl::single(TextUtilities::ParseEntities( + _invoice.cover.description, + TextParseLinks)), st::paymentsDescription); state->seller = CreateChild( cover,