Repository navigation
Fix swipe action sensitivity and accidental triggers (solves #34) - #40
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #34.
Underlying Cause
In Compose Material 3,
SwipeToDismissBoxdefaults to a fixedpositionalThresholdof56.dp(~12–15% of row width on standard mobile displays). In addition,AnchoredDraggablehas a low velocity threshold (125.dp/s), meaning any slight diagonal drift or lift-off centroid roll during normal vertical scrolling inLazyColumnor tapping registered as a dismissal action (toggle read / delete dialog).Solution & Changes
0.4f) of the row width (totalDistance * 0.4f) with a140.dpfallback when layout width is unmeasured.confirmValueChange, verified both magnitude and direction against threshold:StartToEnd(mark read/unread) requires positive offsetoffsetPx >= threshold.EndToStart(delete) requires negative offsetoffsetPx <= -threshold.Settledis always allowed.GestureThresholdActivate) is triggered the exact moment the gesture crosses the 40% dismissal threshold (viasnapshotFlow+distinctUntilChanged), avoiding desynchronization where feedback previously lagged until 50% midpoint.versionNameto1.3.19(versionCode 33) and added Fastlane release notes in English and Persian.