From 0fa385c465d03c678bbfa21853ac0095c69bce1c Mon Sep 17 00:00:00 2001 From: Thomas <9749173+uhthomas@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:56:51 +0000 Subject: [PATCH] fix(mobile): infer drag intent early (#26344) The drag intent was not set until it reached the kTouchSlop threshold. This is not necessary as flutter already has its own heuristics for preventing unintended drags. The result of using kTouchSlop is that dismissing or scroll can feel a little delayed, and will jump from 0 to kTouchSlop (18px) rather than moving smoothly. --- .../presentation/widgets/asset_viewer/asset_page.widget.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart index 1a7c73f821..3dfc37e2f3 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart @@ -143,8 +143,8 @@ class _AssetPageState extends ConsumerState { if (_dragIntent == _DragIntent.none) { _dragIntent = switch ((details.globalPosition - _dragStart!.globalPosition).dy) { - < -kTouchSlop => _DragIntent.scroll, - > kTouchSlop => _DragIntent.dismiss, + < 0 => _DragIntent.scroll, + > 0 => _DragIntent.dismiss, _ => _DragIntent.none, }; }