Skip to content

Fix sticky header visibility during animations#59

Open
AfzalivE wants to merge 1 commit into
masterfrom
afzal/fix.duplicate-sticky-header
Open

Fix sticky header visibility during animations#59
AfzalivE wants to merge 1 commit into
masterfrom
afzal/fix.duplicate-sticky-header

Conversation

@AfzalivE

@AfzalivE AfzalivE commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Calculate sticky-header anchor visibility using rendered bounds.
  • Apply the correction to normal vertical and horizontal layouts.

Why

RecyclerView item animations lay moving headers out at their final coordinates and use translation to render them at their current position.

isViewValidAnchor() subtracted that translation from the view's bottom or right edge. This could reject a real header while it was still visible, causing the following item to become the anchor and creating a duplicate sticky header.

Using bottom + translationY and right + translationX aligns the visibility check with the header's rendered position without special-casing animation state or scanning additional children.

Testing

  • Reproduced in Todoist Android by rescheduling the only overdue task to Today.
  • Verified the transition keeps one Today header and the correct item ordering.

@AfzalivE AfzalivE removed the bug label Jul 12, 2026
@AfzalivE AfzalivE requested review from a team and rastislavvasko and removed request for a team July 12, 2026 05:46
@AfzalivE AfzalivE marked this pull request as ready for review July 12, 2026 05:46

@doistbot doistbot 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.

This PR updates Fix sticky header visibility during animations. No issues were flagged in the reviewed diff.

Share FeedbackReview Logs

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.

2 participants