From eac5c39a96db3194c655603204b7b20f391f1d25 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 13 Mar 2024 21:58:27 +0400 Subject: [PATCH] Don't show IV button for album links. --- Telegram/SourceFiles/data/data_web_page.cpp | 6 +++++- Telegram/SourceFiles/data/data_web_page.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_web_page.cpp b/Telegram/SourceFiles/data/data_web_page.cpp index 297e997c5..215e1a407 100644 --- a/Telegram/SourceFiles/data/data_web_page.cpp +++ b/Telegram/SourceFiles/data/data_web_page.cpp @@ -148,6 +148,8 @@ WebPageType ParseWebPageType( } else if (type == u"telegram_megagroup_request"_q || type == u"telegram_chat_request"_q) { return WebPageType::GroupWithRequest; + } else if (type == u"telegram_album"_q) { + return WebPageType::Album; } else if (type == u"telegram_message"_q) { return WebPageType::Message; } else if (type == u"telegram_bot"_q) { @@ -172,7 +174,9 @@ WebPageType ParseWebPageType( } bool IgnoreIv(WebPageType type) { - return !Iv::ShowButton() || (type == WebPageType::Message); + return !Iv::ShowButton() + || (type == WebPageType::Message) + || (type == WebPageType::Album); } WebPageType ParseWebPageType(const MTPDwebPage &page) { diff --git a/Telegram/SourceFiles/data/data_web_page.h b/Telegram/SourceFiles/data/data_web_page.h index 2a13dfb6f..a659780c9 100644 --- a/Telegram/SourceFiles/data/data_web_page.h +++ b/Telegram/SourceFiles/data/data_web_page.h @@ -25,6 +25,7 @@ enum class WebPageType : uint8 { None, Message, + Album, Group, GroupWithRequest,