Stats Traffic: Fix a crash on iOS 15 & 16 when expanding rows #22857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #22853
Stats Traffic crashes when expanding table view rows (e.g. Clicks, Authors cards) on iOS 15 and iOS 16. The issue is not reproducible on iOS 17:
The crash is related to recent changes made that introduced diffable data source to Stats Traffic tab (
StatsPeriodTableViewController
). I updated table view reloads that were triggered by view model but haven't updates table view reloads triggered by trying to expand table view cell rows. It incorrectly callsperformBatchUpdates
which shouldn't be called for table views that use diffable data souce.We missed this crash since it doesn't happen on iOS 17.
My changes removed the animation when expanding table view rows. However, this is intentional since the animation both on Stats Traffic and Days/Weeks/Months/Years tabs looks broken.
iOS 16 crash
Crash.iOS.16.mp4
iOS 16 no crash after the fix
No.Crash.After.Fix.mp4
To test:
iOS 15 / iOS 16
iOS 17
Regression Notes
Couldn't identify
Manual testing
None
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: