Skip to content

Fix: raise swipe velocity threshold to prevent accidental navigation in message viewer#10748

Open
digitalby wants to merge 1 commit intothunderbird:mainfrom
digitalby:fix/swipe-velocity-threshold
Open

Fix: raise swipe velocity threshold to prevent accidental navigation in message viewer#10748
digitalby wants to merge 1 commit intothunderbird:mainfrom
digitalby:fix/swipe-velocity-threshold

Conversation

@digitalby
Copy link
Copy Markdown

Fixes #10747

Summary

A single constant change in MessageViewContainerFragment raises the velocity threshold for
the swipe-between-messages gesture, preventing fast but unintentional gestures from navigating
to an adjacent email and marking it as read.

The distance threshold (VIEW_PAGER_SWIPE_THRESHOLD = 0.4f) is unchanged.

Notes on the constant value

3.0f is not a final answer. The absolute dp/s value depends on the device. However, this makes accidental velocity-based swipes much harder to trigger. It does not:

  • Prevent a deliberate but regretted swipe from marking an email as read
  • Add a delay before mark-as-read fires
  • Add any visible indicator of read state in the message viewer

Those are separate concerns that I've raised an issue about.

Testing

  • Manual: open message list, make a fast short flick left/right → should not navigate
  • Manual: make a deliberate fast swipe left/right → should still navigate normally
  • Manual: make a slow deliberate drag > 40% width → should still navigate normally
  • Existing tests: ./gradlew :legacy:ui:legacy:test

@github-actions
Copy link
Copy Markdown
Contributor

Missing report label. Set exactly one of: report: include, report: exclude OR report: highlight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accidental swipe in message viewer marks unread email as read

2 participants