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
1 changed files with 3 additions and 2 deletions

View File

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