diff --git a/Telegram/Resources/icons/chat/mini_info_alert.png b/Telegram/Resources/icons/chat/mini_info_alert.png new file mode 100644 index 0000000000..8c79b97d3b Binary files /dev/null and b/Telegram/Resources/icons/chat/mini_info_alert.png differ diff --git a/Telegram/Resources/icons/chat/mini_info_alert@2x.png b/Telegram/Resources/icons/chat/mini_info_alert@2x.png new file mode 100644 index 0000000000..e36a5ed410 Binary files /dev/null and b/Telegram/Resources/icons/chat/mini_info_alert@2x.png differ diff --git a/Telegram/Resources/icons/chat/mini_info_alert@3x.png b/Telegram/Resources/icons/chat/mini_info_alert@3x.png new file mode 100644 index 0000000000..1c8cfe8ede Binary files /dev/null and b/Telegram/Resources/icons/chat/mini_info_alert@3x.png differ diff --git a/Telegram/SourceFiles/history/view/history_view_about_view.cpp b/Telegram/SourceFiles/history/view/history_view_about_view.cpp index 47e24e07ae..f97e943553 100644 --- a/Telegram/SourceFiles/history/view/history_view_about_view.cpp +++ b/Telegram/SourceFiles/history/view/history_view_about_view.cpp @@ -208,6 +208,26 @@ auto GenerateNewPeerInfo( }); } + if (const auto count = user->commonChatsCount()) { + const auto url = u"internal:common_groups/"_q + + QString::number(user->id.value); + entries.push_back({ + tr::lng_new_contact_common_groups(tr::now), + Ui::Text::Wrapped( + tr::lng_new_contact_groups( + tr::now, + lt_count, + count, + lt_emoji, + TextWithEntities(), + lt_arrow, + Ui::Text::IconEmoji(&st::textMoreIconEmoji), + Ui::Text::Bold), + EntityType::CustomUrl, + url), + }); + } + push(std::make_unique( std::move(entries), st::newPeerSubtitleMargin, @@ -223,8 +243,9 @@ auto GenerateNewPeerInfo( ? Data::SingleCustomEmoji( details->iconId ).append(' ').append(details->description) - : TextWithEntities().append( - tr::lng_new_contact_not_official(tr::now)); + : Ui::Text::IconEmoji( + &st::newPeerNonOfficial + ).append(' ').append(tr::lng_new_contact_not_official(tr::now)); push(std::make_unique( text, st::newPeerSubtitleMargin, diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index b07eab0beb..b657a31ad0 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -327,6 +327,11 @@ topicButtonArrowSkip: 8px; topicButtonArrowPosition: point(3px, 3px); topicButtonArrow: icon{{ "dialogs/dialogs_topic_arrow", historyReplyIconFg }}; +textMoreIconEmoji: IconEmoji { + icon: topicButtonArrow; + padding: margins(-2px, 5px, 0px, 0px); +} + msgBotKbIconPadding: 4px; msgBotKbUrlIcon: icon {{ "inline_button_url", msgBotKbIconFg }}; msgBotKbSwitchPmIcon: icon {{ "inline_button_switch", msgBotKbIconFg }}; @@ -1228,3 +1233,7 @@ markupWebview: icon {{ "chat/markup_webview", windowFg }}; newPeerTitleMargin: margins(11px, 16px, 11px, 6px); newPeerSubtitleMargin: margins(11px, 0px, 11px, 16px); +newPeerNonOfficial: IconEmoji { + icon: icon{{ "chat/mini_info_alert", windowFg }}; + padding: margins(0px, 2px, 0px, 0px); +}