Weakened gesture orientation check within swipe-to-reply.

This commit is contained in:
23rd 2024-09-04 10:05:47 +03:00 committed by John Preston
parent dd100fb709
commit 89c2ba4293

View file

@ -110,9 +110,10 @@ void SetupSwipeHandler(
state->delta = args.delta; state->delta = args.delta;
const auto diffXtoY = std::abs(args.delta.x()) const auto diffXtoY = std::abs(args.delta.x())
- std::abs(args.delta.y()); - std::abs(args.delta.y());
if (diffXtoY > 0) { constexpr auto kOrientationThreshold = 1.;
if (diffXtoY > kOrientationThreshold) {
setOrientation(Qt::Horizontal); setOrientation(Qt::Horizontal);
} else if (diffXtoY < 0) { } else if (diffXtoY < -kOrientationThreshold) {
setOrientation(Qt::Vertical); setOrientation(Qt::Vertical);
} else { } else {
setOrientation(std::nullopt); setOrientation(std::nullopt);