From 02f39851257e6f350542e4e12007b7435b809765 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 12 Jan 2023 11:24:25 +0400 Subject: [PATCH] Inspect correct url() instead of dragText(). Fixes #25720. Regression was introduced in 23387d6625. --- Telegram/SourceFiles/data/data_media_types.cpp | 2 +- Telegram/SourceFiles/history/history_location_manager.h | 4 ++++ Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp | 2 +- Telegram/lib_ui | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 55e6dd172..9fbf014bc 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -1323,7 +1323,7 @@ TextForMimeData MediaLocation::clipboardText() const { if (!descriptionResult.text.isEmpty()) { result.append(std::move(descriptionResult)); } - result.append(LocationClickHandler(_point).dragText()); + result.append(LocationClickHandler(_point).url()); return result; } diff --git a/Telegram/SourceFiles/history/history_location_manager.h b/Telegram/SourceFiles/history/history_location_manager.h index 97f7e9c2a..63f9d3b1d 100644 --- a/Telegram/SourceFiles/history/history_location_manager.h +++ b/Telegram/SourceFiles/history/history_location_manager.h @@ -24,6 +24,10 @@ public: return QString(); } + QString url() const override { + return _text; + } + QString dragText() const override { return _text; } diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 2d6781e76..5e0615179 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -4549,7 +4549,7 @@ void OverlayWidget::handleMouseRelease( updateOver(position); if (const auto activated = ClickHandler::unpressed()) { - if (activated->dragText() == u"internal:show_saved_message"_q) { + if (activated->url() == u"internal:show_saved_message"_q) { showSaveMsgFile(); return; } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index c72beeeb7..a113e5005 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit c72beeeb7c9a02dcfd9b0f3cd23d88100d33225b +Subproject commit a113e500503dd4f91211254b74b4b090b64ead34