From ff0f7f49dadc7c0c25d89de6b44b82147c97d0fa Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 12 Mar 2025 14:02:04 +0400 Subject: [PATCH] Fix new swipes on Windows. --- Telegram/SourceFiles/history/history_widget.cpp | 2 -- Telegram/SourceFiles/ui/controls/swipe_handler.cpp | 5 +++-- Telegram/build/prepare/prepare.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index c6c11b082b..48cecb1301 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -52,8 +52,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/controls/send_button.h" #include "ui/controls/send_as_button.h" #include "ui/controls/silent_toggle.h" -#include "ui/controls/swipe_handler.h" -#include "ui/controls/swipe_handler_data.h" #include "ui/ui_utility.h" #include "inline_bots/inline_bot_result.h" #include "base/event_filter.h" diff --git a/Telegram/SourceFiles/ui/controls/swipe_handler.cpp b/Telegram/SourceFiles/ui/controls/swipe_handler.cpp index 091ebf01e1..eece262ccc 100644 --- a/Telegram/SourceFiles/ui/controls/swipe_handler.cpp +++ b/Telegram/SourceFiles/ui/controls/swipe_handler.cpp @@ -65,8 +65,9 @@ void SetupSwipeHandler( Fn update, Fn generateFinish, rpl::producer dontStart) { - constexpr auto kThresholdWidth = 50; - constexpr auto kMaxRatio = 1.5; + static constexpr auto kThresholdWidth = 50; + static constexpr auto kMaxRatio = 1.5; + struct UpdateArgs { QPoint globalCursor; QPointF position; diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index b9ffb8acd5..86023d1485 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -457,7 +457,7 @@ if customRunCommand: stage('patches', """ git clone https://github.com/desktop-app/patches.git cd patches - git checkout 61bbacab28 + git checkout b88d491492 """) stage('msys64', """