Skip to content

Conversation

@smchase
Copy link

@smchase smchase commented Dec 25, 2025

First time contributor checklist

Contributor checklist

  • My commits are rebased on the latest main branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
  • iPhone 16, iOS 26.2 (xcode simulator)
Screen.Recording.2025-12-24.at.3.17.56.PM.mov

Description

Fixes #6179, see it for context on the issue.

This bug is due to the fact that the parent message dimming animation is composed of a fadeIn and separate async fadeOut. When we tap in quick succession we call dimmerLayer.removeAllAnimations() to remove any old animation, but this doesn't include the fadeOut if the async hasn't fired yet. This means we end up with multiple old async fadeOuts causing the parent message to flicker once the tapping stops.

The fix is to make this into one sync animation that contains the fade in and fade out. This way when the link is tapped again we clear the entire old animation including the fade out. This seems simpler and cleaner than tracking the async queue and clearing from there, and more logically correct to treat the animation as atomic.

@smchase smchase marked this pull request as draft December 25, 2025 02:06
@smchase smchase force-pushed the fix-dimming-animation-flicker branch from 026f57b to 8b39b4e Compare December 25, 2025 02:28
Replace separate fade-in and fade-out animations with a single
CAKeyframeAnimation.
@smchase smchase force-pushed the fix-dimming-animation-flicker branch from 8b39b4e to 951c99a Compare December 25, 2025 02:29
@smchase smchase marked this pull request as ready for review December 25, 2025 02:30
@smchase
Copy link
Author

smchase commented Dec 25, 2025

first PR here so apologies if I missed anything, but hopefully this is a small enough change with enough context on the issue to be easy to review :)

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.

Dimming animation flickers when tapping on parent message quickly

1 participant