Skip to content

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

Merged
wmontwe merged 1 commit into
thunderbird:mainfrom
digitalby:fix/swipe-velocity-threshold
Apr 7, 2026
Merged

Fix: raise swipe velocity threshold to prevent accidental navigation in message viewer#10748
wmontwe merged 1 commit into
thunderbird:mainfrom
digitalby:fix/swipe-velocity-threshold

Conversation

@digitalby

Copy link
Copy Markdown
Contributor

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.

@wmontwe wmontwe added the report: include Include changes in user-facing reports. label Apr 7, 2026
@thunderbird thunderbird deleted a comment from github-actions Bot Apr 7, 2026

@wmontwe wmontwe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Works better!

@wmontwe wmontwe merged commit 89469b3 into thunderbird:main Apr 7, 2026
18 of 20 checks passed
@thunderbird-botmobile

Copy link
Copy Markdown
Contributor

Thanks for your contribution! Your pull request has been merged and will be part of Thunderbird 19. We appreciate the time and effort you put into improving Thunderbird. If you haven’t already, you’re welcome to join our Matrix chat for contributors. It’s where we discuss development and help each other out. https://matrix.to/#/#tb-android-dev:mozilla.org
Hope to see you there! 🚀📱🐦

@thunderbird-botmobile thunderbird-botmobile Bot added this to the Thunderbird 19 milestone Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

report: include Include changes in user-facing reports.

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