diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index e2d806f098..c3701d8397 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -154,6 +154,16 @@ base::options::toggle ShowChannelJoinedBelowAbout({ }); } +[[nodiscard]] rpl::producer TopicSubtext( + not_null peer) { + return rpl::conditional( + UsernamesValue(peer) | rpl::map([](std::vector v) { + return !v.empty(); + }), + tr::lng_filters_link_subtitle(Ui::Text::WithEntities), + tr::lng_info_link_topic_label(Ui::Text::WithEntities)); +} + [[nodiscard]] Fn UsernamesLinkCallback( not_null peer, not_null controller, @@ -1692,7 +1702,7 @@ object_ptr DetailsFiller::setupInfo() { }); const auto linkLine = addInfoOneLine( (topicRootId - ? tr::lng_info_link_topic_label(Ui::Text::WithEntities) + ? TopicSubtext(_peer) : UsernamesSubtext(_peer, tr::lng_info_link_label())), std::move(linkText), QString());