Fix forum topic state, custom sounds, and double-tap reactions - #14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42f262f660
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| boolean isDoubleTap = pendingMessageClick != null && pendingMessageClickId == msg.getId() && | ||
| eventTime - pendingMessageClickTime <= ViewConfiguration.getDoubleTapTimeout() && | ||
| dx * dx + dy * dy <= doubleTapSlop * doubleTapSlop; |
There was a problem hiding this comment.
Recognize the double tap on the second down event
When the second finger-down occurs within the double-tap timeout but its corresponding ACTION_UP occurs after that deadline, the pending runnable fires while the second tap is still held and opens the message action instead of applying the reaction. Android defines this timeout between the first up and second down, but this check runs only from ACTION_UP and compares the second up time; cancel or mark the pending single click when the qualifying second ACTION_DOWN arrives.
Useful? React with 👍 / 👎.
What changed
Intent.data,ClipData, orEXTRA_STREAMRoot causes
Forum topics returned from anchor selection before the topic-specific saved position was read. Pinned topics can also open before
ForumTopicmetadata is loaded, so chat-wide unread state was repeatedly used as the anchor. The sound picker assumed every Android picker returnedEXTRA_RINGTONE_PICKED_URI, while vendor pickers may return a document URI through other standard intent fields.Validation
git diff --check