Skip to content

Respect shouldAnimateItems in diffing section controllers#140

Merged
gmarm merged 1 commit intodevelopfrom
fix/respect-should-animate-in-diffing-controllers2
Apr 13, 2026
Merged

Respect shouldAnimateItems in diffing section controllers#140
gmarm merged 1 commit intodevelopfrom
fix/respect-should-animate-in-diffing-controllers2

Conversation

@gmarm
Copy link
Copy Markdown
Contributor

@gmarm gmarm commented Apr 13, 2026

Ticket: PTECH-34068

Summary

Fixes section controller base classes to respect shouldAnimateItems(from:to:) overrides.

DiffingListSectionController, ManualDiffingListSectionController, and FoundationDiffingListSectionController all override calculateUpdate(from:to:) but never pass shouldAnimateItems(from:to:) to the CollectionViewSectionUpdate initializer, causing it to always default to true.

This means subclasses that override shouldAnimateItems to return false have no effect — updates are always animated

Fix by threading the shouldAnimateItems result through to the shouldAnimate parameter in all three controllers, matching the behavior of the base ListSectionController.calculateUpdate.

@gmarm gmarm requested a review from a team as a code owner April 13, 2026 06:34
Copy link
Copy Markdown
Contributor

@HeEAaD HeEAaD left a comment

Choose a reason for hiding this comment

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

LGTM

@gmarm gmarm force-pushed the fix/respect-should-animate-in-diffing-controllers2 branch from 4cfac51 to 095676a Compare April 13, 2026 07:10
@gmarm gmarm merged commit bd4a6cd into develop Apr 13, 2026
5 checks passed
@gmarm gmarm deleted the fix/respect-should-animate-in-diffing-controllers2 branch April 13, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants