From 57b27d217cc3c0071b619d48a6992b7689654929 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 30 Dec 2019 13:38:02 +0300 Subject: [PATCH] Fix 'Open GIF' context menu item. Fixes #6908. --- .../SourceFiles/history/admin_log/history_admin_log_inner.cpp | 2 +- Telegram/SourceFiles/history/history_inner_widget.cpp | 2 +- Telegram/SourceFiles/history/view/history_view_context_menu.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index 523fa6420..dd2328a46 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -1052,7 +1052,7 @@ void InnerWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (const auto item = document->session().data().message(itemId)) { const auto notAutoplayedGif = [&] { return document->isGifv() - && Data::AutoDownload::ShouldAutoPlay( + && !Data::AutoDownload::ShouldAutoPlay( document->session().settings().autoDownload(), item->history()->peer, document); diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 324a3f74c..34679ee57 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1572,7 +1572,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { const auto notAutoplayedGif = [&] { return item && document->isGifv() - && Data::AutoDownload::ShouldAutoPlay( + && !Data::AutoDownload::ShouldAutoPlay( document->session().settings().autoDownload(), item->history()->peer, document); diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 6ed135f34..ec3da7b81 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -171,7 +171,7 @@ void AddDocumentActions( if (const auto item = document->session().data().message(contextId)) { const auto notAutoplayedGif = [&] { return document->isGifv() - && Data::AutoDownload::ShouldAutoPlay( + && !Data::AutoDownload::ShouldAutoPlay( document->session().settings().autoDownload(), item->history()->peer, document);