mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
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.
This commit is contained in:
parent
db4e7abf6d
commit
0fa385c465
1 changed files with 2 additions and 2 deletions
|
|
@ -143,8 +143,8 @@ class _AssetPageState extends ConsumerState<AssetPage> {
|
|||
|
||||
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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue