From e64a096dca74c0f3e55646f624bc083d2a83795c Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 29 Oct 2023 08:51:42 +0400 Subject: [PATCH] Don't suggest shrinking media of direct photo links. --- Telegram/SourceFiles/data/data_web_page.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_web_page.cpp b/Telegram/SourceFiles/data/data_web_page.cpp index 932e9e234..e8eef8978 100644 --- a/Telegram/SourceFiles/data/data_web_page.cpp +++ b/Telegram/SourceFiles/data/data_web_page.cpp @@ -254,7 +254,13 @@ bool WebPageData::applyChanges( } return QString(); }(); - if (newDocument || !newCollage.items.empty() || !newPhoto) { + const auto hasSiteName = !resultSiteName.isEmpty() ? 1 : 0; + const auto hasTitle = !resultTitle.isEmpty() ? 1 : 0; + const auto hasDescription = !newDescription.text.isEmpty() ? 1 : 0; + if (newDocument + || !newCollage.items.empty() + || !newPhoto + || (hasSiteName + hasTitle + hasDescription < 2)) { newHasLargeMedia = false; }