From c0246a9373f1ed70680b154f51c446453cf56598 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 4 May 2020 14:18:33 +0400 Subject: [PATCH] Fix pasting of an image with attached URL data. Regression was introduced in db5d599052. Fixes #7794. --- Telegram/SourceFiles/history/history_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 001c3a79a..1ad849fdc 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -4467,6 +4467,8 @@ bool HistoryWidget::confirmSendingFiles( bool HistoryWidget::canSendFiles(not_null data) const { if (!canWriteMessage()) { return false; + } else if (data->hasImage()) { + return true; } else if (const auto urls = data->urls(); !urls.empty()) { if (ranges::find_if( urls, @@ -4474,8 +4476,6 @@ bool HistoryWidget::canSendFiles(not_null data) const { ) == urls.end()) { return true; } - } else if (data->hasImage()) { - return true; } return false; }